Boost logo

Boost :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2002-01-20 16:54:08


Greg Colvin wrote:

> From: "Larry Evans" <jcampbell3_at_[hidden]>
> > ... Could someone
> > describe a case where this is not so, i.e. the user does not know what
> > the most derived class is when creating a shared_ptr<T>?
>
> When using a factory function that returns only a pointer to base?
>

If you mean using the shared_ptr(T*) CTOR, then this is similar
to Maeder's example and, as pointed out in
    http://groups.yahoo.com/group/boost/message/23341
and the user is responsible for avoiding this.


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