Boost logo

Boost :

Subject: Re: [boost] Candidate for 1.66.1, if there is one
From: Robert Ramey (ramey_at_[hidden])
Date: 2017-12-23 17:19:23


On 12/23/17 9:08 AM, James E. King, III via Boost wrote:
> 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.

actually you'd need test archives for ALL previous verisions. This
would be quite a thing to manage.

> 2. Typically the conditionals for version are on the load() side; is there
> a way to tell archive to:
> ar << use_version<boost::posix_time::ptime, 0>() <<
> ptime(some_value)
> and add conditional code to the save() code path so that it would write
> out a version 0 like the previous release did?
> I'm not sure it's typical to see the version number actually used in
> the save() code path.
> That would be pretty useful and allow for understandable unit tests,
> but I don't know how easy it would be to implement.

The capability to produce previous versions of an archive has be
requested multiple times. The first few times I was dismissive of the
idea. One I was goaded into looking into it, I could see that it was in
fact doable and there was a natural interface through the archive
opening flags. In other words, it was possible to implement this
without turning the whole serialization library into an unholy mess -
assuming one doesn't believe that it already is. But still a lot of
tricky work, large increment in testing, etc.

And as one might imagine, I would be reluctant to undertake a large
investment of effort to implement an enhancement to the library which
would be of value to only a few people. Of course if someone where to
offer me (a lot) of money ...

Robert Ramey

>
> - Jim
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk