$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-08-22 12:10:55
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" <mviala_at_[hidden]> wrote in message news:D0D608FD34E14C4BA93A30AC162651E18BA519_at_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<boost::optional<>>()  @ line 60 in file boost/serialization/optional.hpp.
   
  template<class Archive, class T>
  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<Archive, T> 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 
   
------------------------------------------------------------------------------
  _______________________________________________
  Boost-users mailing list
  Boost-users_at_[hidden]
  http://listarchives.boost.org/mailman/listinfo.cgi/boost-users