Boost Serialize backward compatibility issues

1.2k views Asked by At

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 ?

1

There are 1 answers

3
usta On BEST ANSWER

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