Boost logo

Boost :

From: Dave (better_cs_now_at_[hidden])
Date: 2005-01-21 17:54:49


Hello NG,

With regard to shared_ptr<>...

Let's say I have a heap object of type O that contains one subobject of type
SO. At this point, I'm deliberately not saying whether the subobject is
brought into the object by public inheritance or by containment. Either
way, the memory layout is the same under most implementations.

May I upcast shared_ptr<O> to shared_ptr<SO> in any case? Or, does the
answer depend on whether the subobject has been brought in by public
inheritance or by containment?

Same question for a downcast (dynamic cast)...

Thanks,
Dave


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