Re: [Boost-bugs] [Boost C++ Libraries] #4903: Serialization library in Boost 1.45 is unable to read archive created with Boost 1.39

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4903: Serialization library in Boost 1.45 is unable to read archive created with Boost 1.39
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-23 02:50:04


#4903: Serialization library in Boost 1.45 is unable to read archive created with
Boost 1.39
-------------------------------------------------------+--------------------
  Reporter: Rüdiger Brünner <rbruenner@…> | Owner: ramey
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.45.0 | Severity: Showstopper
Resolution: | Keywords:
-------------------------------------------------------+--------------------

Comment (by ramey):

 OK - looks like you're on to something here. I'm testing the following
 now:


 {{{
     void load_override(class_id_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){
             int_least16_t x=0;
             * this->This() >> x;
             t = boost::archive::class_id_type(x);
         }
         else
         if(boost::archive::library_version_type(3) < lvt){
         {
             int x=0;
             * this->This() >> x;
             t = boost::archive::class_id_type(x);
         }
         else{
             // upto 255 versions
             unsigned char x=0;
             * this->This() >> x;
             t = version_type(x);
         }
     }
 }}}

 This should be a more general solution.

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4903#comment:15>
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