Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-21 09:45:47

----- Original Message -----
From: "Larry Evans" <jcampbell3_at_[hidden]>

> Yes, I realized that too late.
> Now, about counted_base. Since one of the purposes of counted_base is to
> overcome the lack of virtual DTOR, could John Maddox's is_polymorphic<>
> trait be used to provide a specialized version of counted_base_impl
without the
> extra D del pointer?

struct A {};
struct B { virtual ~B(); };

shared_ptr<B> x(new B());
shared_ptr<A> y(x); // <--- what happens here?

struct C { virtual void f(); }
struct D : C { };

shared_ptr<D> d(new D);
shared_ptr<C> c(d); // <--- or here?

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