On Sat, Dec 23, 2017 at 11:25 AM, Robert Ramey via Boost < boost@lists.boost.org> wrote:
On 12/23/17 7:58 AM, James E. King, III via Boost wrote:
I'm looking at adding a test to write out a version 0 and then read it in when the current version is 1, but I don't want to add test-only support code to the headers that get shipped, so if anyone can point me at a current example unit test that writes out a "n-1" version and then reads in a "n" version with boost::serialization I would appreciate it.
This is something which would be very useful and has always been desired.
a) It would be quite a bit of work to implement such a series of tests b) and describe how to set it up c) The serialization library already places a lot of burden on the testing infrastructure. This would increases that load significantly.
Robert Ramey
Two ways I can see doing this:
1. Craft a version 0 output stream manually or with the help of
serialization code directly in the test, then read it in.
2. Typically the conditionals for version are on the load() side; is there
a way to tell archive to:
ar << use_version