
22 Oct
2009
22 Oct
'09
8:21 a.m.
Maybe this is a simple question but... Suppose to have: template<typename T> class Base {...}; template<typename T> class Derived : public Base<T> {...}; and shared_ptr< Base<T> > BasePtr; shared_ptr< Derived<T> > DerivedPtr; How can assign BasePtr to DerivedPtr? Thanks Daniele.

22 Oct
22 Oct
9:54 a.m.
Maybe this is a simple question but... Suppose to have:
template<typename T> class Base {...};
template<typename T> class Derived : public Base<T> {...};
and
shared_ptr< Base<T> > BasePtr; shared_ptr< Derived<T> > DerivedPtr;
How can assign BasePtr to DerivedPtr?
boost::static_pointer_cast
5643
Age (days ago)
5643
Last active (days ago)
2 comments
2 participants
participants (2)
-
Daniele Barzotti
-
Igor R