Boost logo

Boost :

Subject: Re: [boost] [modularization] Extract xml_archive from serialization
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2014-09-22 15:42:31


On Mon, Sep 22, 2014 at 12:05 PM, Vladimir Prus <vladimir_at_[hidden]>
wrote:

> Yes, it's possible in principle, and even with current serialization code,
> but it's not clear that replacing
>
> BOOST_SERIALIZATION_NVP(data_member)
>
> with
>
> boost::serialization::make_nvp("data_member", data_member)
>
> is net win.

For users of library A who do not need its functionality that requires a
library B, allowing them to compile A without B is a net win. Especially if
A is a major coupling point, B is relatively large, and the need to use A
is independent of the need to use B.

As well, in principle the call to serialize a data member doesn't need to
be qualified: read(ar,foo_,"foo") seems quite straight-forward.

Besides, serialization usually requires access to private data members, so
breaking this dependency by refactoring read/write code into a separate
header is not possible in general.

-- 
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