Boost logo

Boost :

Subject: Re: [boost] [serialization] Custom archive and arrays
From: Robert Ramey (ramey_at_[hidden])
Date: 2016-01-22 14:50:29


On 1/22/16 9:55 AM, Bjorn Reese wrote:
> On 01/22/2016 05:54 PM, Robert Ramey wrote:

> My concern is more that Boost.Serialization imposes a serialization
> sequence that is invalid for certain encoding formats. This means that
> we have to by-pass Boost.Serialization for the serialization of arrays.

Hmmm - try thinking of the serialization library in a slightly different
way. Think of it as a framework for implementation of serialization for
other types. Then consider the specific types included in the library
as "examples" of how to use the library. Think of overloading as
"customization points". So you ARE bypassing the usual/default/expected
implementation of the library in order to use your own. The only thing
I can say about this is that perhaps built-in arrays shouldn't have been
in the "primitive-set" and implemented like other STL types. Perhaps.
But I don't think it's a big deal. When I did it, I thought in terms of
a hierarchy - C++ builtin types as part of the "built-in"
implementation. STL types as "standard add-ons" to the library and
everything else as the users's responsability. If I had to live my life
over I might have factored it in a different way - oh well.

Robert Ramey


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