$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-02-12 12:14:53
Matthias Troyer wrote:
> On Feb 12, 2006, at 2:59 AM, Peter Dimov wrote:
>
>> David Abrahams wrote:
>> A strong typedef should work, if all archives implement its
>> serialization.
as a general rule, the included archives only implment serialization
for primitives. This permits all serializations to work with all
archives. Its been a constant battle to keep these things
decoupled in order to preserve this feature.
serializations should be attributes of the type NOT any
particular archive.
>
> As far as I understand there is a default implementation of
> serialization for
> strong typedefs, which just serializes the underlying type.
LOL - I'm embarassed to say that off hand I don't know the
answer to this!!. I used BOOST_STRONG_TYPEDEF for
the special types needed for the library internals and implemented
in them in the archive. BOOST_STRONG_TYPEDEF will
convert to the underlying type when used in an arithmetic
context and I believe that this might be enough to get
serialization for free. Or maybe not.
BOOST_STRONG_TYPEDEF should be considered for
promotion out of the serialization library into the core of
boost itself.
Robert Ramey