Boost logo

Boost Users :

Subject: Re: [Boost-users] Serialization Archive Incompatibility between BoostVersions
From: David Graf (david.graf_at_[hidden])
Date: 2009-04-09 06:21:29


Hello

BOOST_CLASS_VERSION is used for something else. With this makro, a
programmer can change her save/load/serialize implementations and
react on older versions of her own code.

But I have the problem that classes serialized with older BOOST (or
Boost Archive) versions cannot be read with newer ones.

This version is declared at the beginning of a serialized archive. E.g.:

The following beginning of a text archive is serialized with boost 1.37:
22 serialization::archive 5 0 35 ...

Serialized with boost 1.35 it looks like this:
22 serialization::archive 4 0 35 ...

Otherwise, the archives are in my case completely identical.

Somehow, if this version number does not match to the serialized or
archive version of the used boost library, boost throws an exception.

David

On Apr 8, 2009, at 7:09 PM, Robert Ramey wrote:

> In the documention is described how to use "version" to
> conditionally invoke code depending upon the BOOST_CLASS_VERSION
> setting at the time the archive was created? Does this not address
> your situation?
>
> Robert Ramey
> "David Graf" <david.graf_at_[hidden]> wrote in message news:500991ee0904080518k4a571d54m6712cf1a83e05219_at_[hidden]
> ...
> Hello
>
> How is it possible to load serialized objects with a newer boost
> version than they have been saved with. I have installed boost
> version 1.36 and I cannot read archives that have been save with
> boost 1.35. This is not possible because boost 1.35 puts
> 'serialization::archive 4' into the files but boost 1.36 needs the
> archive version 5.
>
> I found some information in the documentation that is must be
> possible to read old archives. But I am not able to do it. I always
> get exceptions.
>
> Thank you in advance for help!
>
> David
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users



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