Boost logo

Boost :

From: Thomas Maeder (maeder_at_[hidden])
Date: 2002-01-18 15:30:27


Am 2002.01.18 20:41 schrieb(en) Peter Dimov:
> Possible, but inconvenient. There is no good reason to introduce
> undefined
> behavior here. Consider:
>
> shared_ptr<Derived> d(new Derived);
> shared_ptr<Base> b(d);
> b.reset();
> d.reset();
>
> The second line is the same but it now works (with the current
> implementation.)

Is there a realistic use case where the second line is needed / useful
in a class hierarchy without a virtual base class destructor?


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