From: Robert Ramey (ramey_at_[hidden])
Date: 2004-10-25 12:05:23
"Russell Hind" <rh_gmane_at_[hidden]> wrote in message
> If I try and write a list<shared_ptr<const T> > to an archive, I get a
> compilation error. I'm guessing this is because the objects in the list
> are shared_ptr<const T>
> The documentation for const members says to use const_cast<T&>(t) but
> when you want to try and write a list, you can't do this unless you
> write all the objects manually.
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.
> Is there a way for serialization to be able to handle the const
> implicitly (for containers at least)? Otherwise the only solutions I
> can see are
> - Don't use const objects
> - Write all elements of the list ourselves.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk