Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-07-05 12:35:21


David Abrahams wrote:
> "Robert Ramey" <ramey_at_[hidden]> writes:
>
> What is the mechanism at work here? Anything involving an #include
> order dependency worries me, because usually these things are a
> playground for ODR violations or other inducers of undefined behavior.

The idea is that I didn't want to burden user's of the library with loading
the shared_ptr_132.hpp header if they don't need it. So if you don't need
to read older archives one can use:

#include <boost/serialization/shared_ptr.hpp>

which is what everyone would expect. This skips over useless and wasteful
code that is not needed.

If one needs his code to be able to read shared_ptr archived under the 1.32
system, he would use:

#include <boost/serialization/shared_ptr_132.hpp>
#include <boost/serialization/shared_ptr.hpp>

Of course an alternative would be for <boost/serialization/shared_ptr.hpp>
to include .../shared_ptr_132.hpp but I thought people without old archives
would object to that - as I would personally.

Robert Ramey


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