$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] casting shared pointers to derived classes
From: Don Wilde (donintel11_at_[hidden])
Date: 2012-01-11 11:58:35
[snip]
Use tools provided by the shared_ptr itself...
Take a look at http://www.boost.org/doc/libs/1_48_0/libs/smart_ptr/shared_ptr.htm#Synopsis, especially at these functions:
template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r); // never throws template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r); // never throws template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r); // never throws
[snip]
Thank you Ovanes and Thomas for your insights!
I appreciate the help. :D