Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] class versioning changes in boost 1.42
From: Jarl Lindrud (jlindrud_at_[hidden])
Date: 2010-03-01 18:04:55


Robert Ramey <ramey <at> rrsd.com> writes:

>
> Robert Ramey wrote:
> > Jarl Lindrud wrote:
> >> There is definitely a breaking archive format change in
> >> basic_binary_iarchive.hpp:110 (1.42.0) - collection sizes serialized
> >> as std::size_t rather than unsigned int.
>
> The code in question is:
>
> void load_override(serialization::collection_size_type & t, int){
> if (this->get_library_version() < 6) {
> unsigned int x=0;
> * this->This() >> x;
> t = serialization::collection_size_type(x);
> }
> else {
> std::size_t x=0;
> * this->This() >> x;
> t = serialization::collection_size_type(x);
> }
> }
>
> This indicates that if the serialization library version is less than 6,
> then
> read the collection count as an unsigned int from the file. Otherwise
> read the collection count as an std::size_t from the file. Thus, backward
> compatibility is maintained through this change.
>

Sure. The point being made is that, contrary to your assumption, it is
generally not possible for 1.35.0 based programs to read archives produced by
1.42.0 based programs.

As the version number is 6, one might suspect that this isn't the only format
change that's occurred.

Regards,
Jarl.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net