Boost logo

Boost :

Subject: Re: [boost] [intro] Preview: Introspection library
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-06-30 12:48:46


David Sankel wrote:
> The serialization library describes its feature as a function that
> converts a supported object to a sequence of bytes and back into an
> "equivalent structure". The meaning of "equivalent structure"
> unfortunately isn't defined in the documentation.
>
> Consider the following example:
>
> struct Z
> { A * a;
> , B b;
> };
>
> If we consider syntactic equivalence, the result of serializing this
> would be something like:
>
> Z{ a=0x029348af, b=B{...} }
>
> If we use semantic equivalence, serialization could result in any
> number of things, including:
>
> Z { a=new A{...}, b=B{...} }
>
> or even:
>
> Z {}
>
> It depends on what the meaning of a Z is.

The serialization library implements the latter. It never occurred to me to
formally define "equivalent structure" as only the latter definition is
useful for the purposes for which the library is intended - persistence and
marshalling. If anyone want's to suggest an enhancement to the
documentation I'll consider it.

Robert Ramey


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