c++serializationboostbackwards-compatibilityforward-compatibility

Boost Serialize backward compatibility issues


Data saved by boost::archive::text_oarchive at Boost v1.47 cannot be loaded by boost::archive::text_iarchive at Boost v1.37. It throws an exception with meddage "unknown version".

Here a workaround is provided for a similar issue with binary archives, but it seems it doesn't work for text archives.

Is there a fix which I can do at Boost v1.37 ?


Solution

  • What you're looking after is not backward compatibility, but forward compatibility.

    Boost.Serialization does not support forward compatibility out of the box, AFAIK. You might have success with xml archives, but it still will require some work on your part. See this thread