Re: [Boost-bugs] [Boost C++ Libraries] #4660: Error read binary archive, created by old boost version

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4660: Error read binary archive, created by old boost version
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-15 01:37:50


#4660: Error read binary archive, created by old boost version
---------------------------------------+------------------------------------
  Reporter: serge-voropaev@… | Owner: ramey
      Type: Bugs | Status: reopened
 Milestone: Boost 1.45.0 | Component: serialization
   Version: Boost 1.45.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------+------------------------------------

Comment (by d s m a l l @…):

 Replying to [comment:38 ramey]:

 Sorry for the delay in reply. The code you posted won't work for us.
 Fwiw, below is the code that we have in our over-ride header. With it all
 of our unit tests are passing

 {{{
     void load_override(version_type & t, int version){
         library_version_type lvt = this->get_library_version();
         if(boost::archive::library_version_type(7) < lvt){
             this->detail_common_iarchive::load_override(t, version);
         }
         else
         if(boost::archive::library_version_type(6) < lvt){
             uint_least16_t x=0;
             * this->This() >> x;
             t = boost::archive::version_type(x);
         }
         else
         if(boost::archive::library_version_type(3) == lvt ||
 boost::archive::library_version_type(5) == lvt ){
 #pragma message( "CTMS fix for serialization bug ( lack of backwards
 compatability ) introduced by boost 1.45." )
             // upto 255 versions
             unsigned char x=0;
             * this->This() >> x;
             t = version_type(x);
         }
         else{
             unsigned int x=0;
             * this->This() >> x;
             t = boost::archive::version_type(x);
         }
     }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4660#comment:40>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC