Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-20 09:14:05

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> > where "struct subjAB :public A,public B{...}", when compiled and run
> > "gcc version 3.1 20011207 (experimental)", fails to delete a_make.
> >
> > I am using Peter's
> True, there is no way to detect the general case where a shared_ptr is
> constructed from a T * that actually points to something derived from T.


    typeid(*p) == typeid(T)

Gets you about as far along as you could hope for (my current work uses
/lots/ of RTTI so this jumped out at me ;-)). Not that you'd probably want
to pay for typeid.

I can imagine a policy which checked for this case being useful in debug
mode for some people.


Boost list run by bdawes at, gregod at, cpdaniel at, john at