[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost
Subject:    Re: [boost] [modularization] Extract xml_archive from serialization
From:       Vladimir Prus <vladimir () codesourcery ! com>
Date:       2014-09-19 4:53:07
Message-ID: 541BB6B3.5050803 () codesourcery ! com
[Download RAW message or body]

On 09/18/2014 10:29 PM, Emil Dotchevski wrote:
> On Wed, Sep 17, 2014 at 8:14 PM, Andrey Semashev <andrey.semashev@gmail.com>
> 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



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic