Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-08-30 11:03:45


Martin Slater wrote:
>> a) for boost/serialization/export.hpp relies on previious inclusion
>> of archive headers to know what archives to instantiate code for.
>> This the same as version 1.32
>
> I've never added a new archive so I have never needed to include this
> so to me this is an implemenation detail that I shouldnt need to worry
> about until I implement a new archive type.

This is not an question of a new archive type. The question is which
archives_classes should code be instantiated for. Code for derived pointers
serialized through a base class pointer is never explicitly called from the
program. Without explicit instantiation it won't get generated. One option
is to always generate code for all known archives. I rejected this due to
code bloat considerations. The option I chose was to instantiate code for
the archives actually used by the program. This is detected by checking the
inclusion guards for archives. In order for this to work the archive
headers have to come before export.hpp if BOOST_CLASS_EXPORT is used.

>> I'm still mulling this over.

I've spent some more time on this and I believe that I've managed to resolve
the issues of header dependency so that the situation will be the same as
1.32. That is - no requirement regarding header sequence except for
export.hpp as mentioned above. I'm testing this now and I'm hopeful this
will be satisfactory to all concerned.

Robert Ramey


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