1

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 ?

Community
  • 1
  • 1
Vahagn
  • 4,670
  • 9
  • 43
  • 72

1 Answers1

1

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

usta
  • 6,699
  • 3
  • 22
  • 39
  • Wouldn't say that I am looking after forward compatibility. The issue is that *Boost 1.47 it not backward compatible with Boost 1.37*, so I am looking after to workaround this issue. Well, one workaround might be to manually make Boost 1.37 forward compatible with Boost 1.47 :) – Vahagn Oct 18 '12 at 11:25
  • @Vahagn You said (rephrasing) "Data saved with Boost v1.47 cannot be loaded by Boost v1.37". That is lack of forward compatibility. If Boost 1.47 weren't `backward compatible` with Boost 1.37, then Boost 1.47 wouldn't load archives saved by Boost 1.37 – usta Oct 18 '12 at 11:34
  • By the way, if Boost_v1.47 had a feature of saving an archive in some *Boost_v1.37 mode*, one would refer to that feature as backward compatibility of Boost_v1.47, and the posted issue would be fixed by that feature. – Vahagn Oct 19 '12 at 06:04