Boost logo

Boost :

Subject: Re: [boost] [serialization] Custom archive and arrays
From: Robert Ramey (ramey_at_[hidden])
Date: 2016-01-23 00:45:29


On 1/22/16 3:43 PM, Seth wrote:

> In that vein, how do you like a "decorating" wrapper that allows you to
> override default behaviour:
<snip>

generally I like this sort of thing. The library itself comes with a
few wrappers to be used for things like this - and xml serialization.

I'm not sure it's a good choice in this particular instance though as it
requires the user to explicitly tie the serialization to the archive.

I would expect one to overload the serialize function in the archive
for native C++ arrays.

If one had nothing else to do he could create an "archive adaptor" which
would look like:

class archive_add_special_array<typename base_archive> which
would add the overload to any archive. They you'd just instantiate
a new archive for each base archive etc.

Robert Ramey


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