Thanks for your quick answer Robert.
Sure it doesn't affect the program behaviour but the debug with Visual
C++ IDE is little bit more painful ;-). I'm going to fix my own copy of
the file.
Marc Viala
De la part de Robert Ramey
clearly its a bug but it shouldn't affect any programs, I'll fix it in
my working copy. You can fix it by just initializing to 0.
Robert Ramey
"Marc Viala" wrote in message
news:D0D608FD34E14C4BA93A30AC162651E18BA519@SERVEUR2003.acticm.com...
I've downloaded recently the version Boost 1.34.1 and performed
some tests on ours applications integrating Boost components.
During theses tests, I've tried to deserialize some XML archives
generated w/ Boost 1.33.1 including some boost::optional<> instances and
I've observed that the Visual C++ 7.1 IDE emits run-time checks in the
load>() @ line 60 in file
boost/serialization/optional.hpp.
template
void load(
Archive & ar,
boost::optional<T> & t,
const unsigned int /*version*/
){
bool tflag;
ar >> boost::serialization::make_nvp("initialized", tflag);
if (tflag){
unsigned int v;
if(3 < ar.get_library_version()){
ar >> make_nvp("item_version", v);
}
detail::stack_construct aux(ar, v);
^^^^^^^^^^^^^^^^^^^^^^^^
Here Run-Time Check Failure #3 - The variable 'v' is being used
without being defined.
ar >> boost::serialization::make_nvp("value",
aux.reference());
t.reset(aux.reference());
}
else {
t.reset();
}
}
Is it possible to avoid this run-time check by a
preinitialisation of the local variable "v"? Is it a Bug?
Best regards,
Used Configurations:
Windows XP
Boost 1.34.1 (through Boost Installer w/ DLL libraries)
Marc Viala