boost::shared_ptr
has an unusual constructor
template shared_ptr(shared_ptr const & r, T * p);
and I a
You can also use this to keep dynamic casted pointers, i.e.:
class A {};
class B: public A {};
shared_ptr a(new B);
shared_ptr b(a, dynamic_cast(a.get()));