Boost logo

Boost Users :

From: Bill Lear (rael_at_[hidden])
Date: 2006-06-15 13:20:56


On Thursday, June 15, 2006 at 17:01:57 (+0100) Russell Hind writes:
>Tarjei Knapstad wrote:
>>
>> To handle different versions of data you should split serialize() into
>> separate save()/load() functions as described in the tutorial:
>>
>> http://boost.org/libs/serialization/doc/tutorial.html#splitting
>>
>
>I understand that. That isn't the issue I'm describing. The issue I'm
>describing is that the application *only* knows about version *0* of an
>object, but the file contains version *1* because it was written with a
>newer version that it is being loaded with.

Versioning is per-class, and so why would you increment the version if
you did not introduce forward-incompatible changes? It seems that you
only increment the version if you add/remove data members, reorder
them, or whatever. I don't really see a practical downside to having
the library automatically puke if you are using old code to read a
newer version of a class.

Bill


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