|
Boost : |
Subject: Re: [boost] [modularization] Extract xml_archive from serialization
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2014-09-18 14:29:49
On Wed, Sep 17, 2014 at 8:14 PM, Andrey Semashev <andrey.semashev_at_[hidden]>
wrote:
> On Wednesday 17 September 2014 14:24:28 Robert Ramey wrote:
> > Stephen Kelly-2 wrote
> >
> > > Robert Ramey wrote:
> > >> The "correct" solution to the above is for date-time to build
> > >> two modules: date-time and date-time-serialization.
> > >
> > > Is this "at the expense of everyone who wants to ship datetime with
> > > support
> > > for serialization in the package"? Is that 'non-obvious' too? Is this a
> > > net-
> > > positive?
> >
> > I think its a much smaller number of people.
> >
> > anyone who explicitly includes date-time/serialization.hpp will know that
> > he has to ship the data-time-serialization.dll.
>
> Just to be closer to reality, serialization support in DateTime is header-
> only.
>
In principle there should be no reason for e.g. time_serialize.hpp to
include Boost Serialization headers in order to define the "load" or"save"
function templates needed for serialization.
For example, to define:
template<class Archive>
void save( Archive & ar, const posix_time::time_duration& td, unsigned int
/*version*/)
{
....
}
one doesn't need to include any serialization headers.
Users of time_serialize.hpp who need to save posix_time::time_duration
objects should include the necessary serialization headers themselves.
-- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk