Boost logo

Boost :

Subject: Re: [boost] [serialization] load-only or save-only types?
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-11-04 07:59:00


I'm not exactly sure what you're trying to do. But it looks to me
that perhaps defining your own variation of
boost/serialization/split_member.hpp
or boost/serialization/split_free.hpp might do the trick. The
templates are designed to instantiate only the code actually
called so I believe that they might provide the basis to
build what you're looking for.

Robert Ramey

David Abrahams wrote:
> Hi,
>
> I want to send out instances of one type and receive the same data
> format but build instances of a different type. Obviously I can just
> define serialize() for each of them, but can I define only save for
> the outgoing type and load for the incoming one, causing
> serialization in the other direction to be a compile-time error? Not
> a big deal, but it would be more expressive that way.
>
> TIA,


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk