|
Boost : |
Subject: Re: [boost] [modularization] Extract xml_archive from serialization
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2014-09-19 00:53:07
On 09/18/2014 10:29 PM, Emil Dotchevski wrote:
> 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.
That's true as far as general C++ goes, but you'd very likely need to use
BOOST_SERIALIZATION_NVP - and for XML archives it's required to use it -
and it's a macro, so two phase lookup won't help?
- Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk