Boost logo

Boost :

Subject: Re: [boost] Boost.Serialization issue loading 1.37 binary archive.
From: Nikolay Mladenov (nikolay.mladenov_at_[hidden])
Date: 2011-04-01 15:21:44


I also posted on the list about this and other related problems but Robert
has not responded yet...

On Fri, Apr 1, 2011 at 2:54 PM, Brandon Kohn <blkohn_at_[hidden]> wrote:

> Hello,
>
> I've been using Boost.Serialization for some time, and have found a break
> while upgrading to 1.46.1 (from 1.37). The problem seems to be the size of
> the integral type which stores
>
> v. 1.37 has:
>
> BOOST_ARCHIVE_VERSION(){
> return 5;
> }
>
> When saving to the binary_oarchive:
>
> // basic_binary_oarchive.hpp
> void save_override(const class_id_type & t, int){
> // upto 32K classes
> const int_least16_t x = t.t;
> * this->This() << x;
> }
>
>
> 1.46.1 has:
>
> 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{
> int x=0;
> * this->This() >> x;
> t = boost::archive::class_id_type(x);
> }
> }
>
> The salient point is that on the load in 1.46.1 an int is used to read the
> value which was stored as int_least16_t in version 5 archives. The trunk
> seems to have this as well.
>
> Regards,
>
> Brandon Kohn
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk