Boost logo

Boost :

From: Russell Hind (rh_gmane_at_[hidden])
Date: 2004-10-26 05:45:46


Robert Ramey wrote:
>
> Hmmm, maybe this cast should be in serialize/list.hpp ?
>
> Try adding this cast to your personal copy of serialization/list.hpp and see
> if that addresses the problem. Let me know if that does it.
>

Should it not be in shared_ptr serialize method? The type is

list<shared_ptr<const T> >

You get the same problem with

shared_ptr<const T>

which can't be written. So if you have a member e.g.

shared_ptr<const MyClass_c> m_MyClass;

The the actual member isn't const, it is a shared_ptr, but the thing it
points to is a const object so shouldn't shared_ptr serialize do a
const_cast on its underlying pointer?

If it were a

const shared_ptr<T>

then I agree that it should be in serialize/list.hpp (or probably an
base header of this as the actual serialization doesn't seem to be done
there)

Thanks

Russell


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