Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-04-19 11:52:13


Jeff Garland wrote:

> I believe that Matthew has now demonstrated that archive extension is
> possible, which I believe is one of the major changes from the first
> review. That said, any documentation of this process would clearly be a
> plus. In a typical proprietary archives writing of the version and type
> numbers will need to be shut off. So I can imagine documenting these
> sorts of issues.

As it turns out, type id, and object id are really required only for
pointers and version is in fact optional.

It would be possible to make an archive which:

a) trapped (BOOST_STATIC_ASSERT) attempts to serialize a pointer
b) trapped attempt to save/load object id and class id
c) implemented null serialization of version numbers and trapped attempts to
use version number != 0

This would work only on serializations that had implementation attributes of
no versioning, and no object tracking. If used on other types, it would
trap at compiler time.

I believe that you would have what you wanted. In general, the part of the
library which saves/loads the preamble is invoked only for pointers. An
easy way to check this is to generate XML archive and find that there are
not attributes for this types.

Robert Ramey


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