Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] 1.49 to 1.55 problems
From: Bjorn Reese (breese_at_[hidden])
Date: 2014-01-21 05:23:08


On 01/20/2014 10:15 AM, John M. Dlugosz wrote:
> On 1/16/2014 3:39 AM, Bjorn Reese wrote:

>> Which archive are you using?
>
> I'm not sure what you are asking.

With Boost.Serialization you need two things:

First, you have to annotate your code with the serialize function (or
load/save). This creates a mapping between the C++ variables and the
serialized data.

Second, you have to use an archive to perform the serialization. The
are various archives for different formats, such as text, binary, or
XML. You can even write your own archives in case you need to serialize
to other formats (e.g. JSON or ProtocolBuffer.)

The answer to your question depends on what achive you have used to
serialize the data. Not all of them are backwardscompatible.

> The code base in question contains uses of
> boost::archive::basic_binary_iprimitive, and I believe the code cares
> about integers only, not floating point.

Looks like you are using the binary archives, which are not
backwardscompatible.

If the serialized data is stored in files, it may be an idea to build
a conversion tool with Boost 1.49 that reads the binary format into,
say, the portable_binary achives found in the example directory.

If not, then you may have to copy the Boost 1.49 binary archives
into your own namespace, and use that instead. Not sure how feasible
this is.


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