Boost logo

Boost :

From: Thomas Maeder (maeder_at_[hidden])
Date: 2002-01-19 04:42:50


Am 2002.01.18 21:36 schrieb(en) Peter Dimov:
> Good question.
>
> Is there a realistic use case where the Derived* -> Base* implicit
> conversion is useful when Base is not polymorphic? ;-)

Not so good question, because the answer is obvious. :-)

But I'm not sure if the two questions are as connected as they might
seem to. I use a shared_ptr to express object ownership; and we all
know that it's rarely wise to express ownership of a Derived object
through a (shared) pointer to Base if the Base destructor isn't virtual.

I don't think that my question has been answered yet.


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