Sohail Somani wrote:
Steven Watanabe wrote:
AMDG
Robert Ramey wrote:
Sohail Somani wrote:
Just typing out loud: Forward compatibility is the ability to load an archive with a version of 4 into an application with a version of 3.
To me forward compatability is he ability to create a version 3 archive with a version 4 program. Hmmm - now that I read that, it doesn't look right. I guess that should be called "complete" backward compatibility. I don't see how it is possible while writing version 3 progam to know what version 4 is going to save.
It would be possible in special cases. For example, the version 4 archive could add information that the version 3 program knows to skip somehow.
Right, so one totally naive way the library could do it would be to inject a marker after every serialization call. This way, the version 3 application could simply search for the marker after every serialization call in order to set up the next serialization call.
Basically, I am saying that version 4 of the app writes out:
foo 1 2 3 |END_MARKER| foo 4 5 6 |END_MARKER|
And version 3, which can only read the first two ints, reads foo 1 2 and then resets the stream pointer (or whatever) to right after |END_MARKER|.
If that makes ANY sense, I will be happy.
You might be able to implement that for xml archives by deriving from xml_iarchive. Robert Ramey