Subject: Re: [boost] [modularization] Extract xml_archive from serialization
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2014-09-19 01:20:25
On Thu, Sep 18, 2014 at 9:53 PM, Vladimir Prus <vladimir_at_[hidden]>
> On 09/18/2014 10:29 PM, Emil Dotchevski wrote:
>> 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
>> 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?
Sure, one can write a serialization library that makes this kind of
definition impossible. My point is that in principle it is possible and if
there is a general agreement to refactor important libraries to reduce
physical coupling then it is something that can be done.
This is even more important for a library like Serialization because any
data type may need the ability to be serialized yet many (most?) programs
that use such types will not serialize them.
-- 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