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 ?

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top