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-01-26 16:32:34
#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 ramey):
note that the current code in trunk and release looks like:
{{{
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_least8_t x=0;
* this->This() >> x;
t = boost::archive::version_type(x);
}
else
if(boost::archive::library_version_type(5) < lvt){
uint_least16_t x=0;
* this->This() >> x;
t = boost::archive::version_type(x);
}
else
if(boost::archive::library_version_type(2) < lvt){
// 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);
}
}
}}}
Doesn't this do the job for you?
Robert Ramey
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4660#comment:38> 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