boost::shared_polymorphic_downcast and the other boost::shared_ptr functions reside in <boost/shared_ptr.hpp>
I recently enabled support for C++11 in GCC with -std=c++0x. In order to avoid confusion, I moved from boost::shared_ptr to std::shared_ptr which resides in #include <memory>.
However it appears that shared_polymorphic_downcast is not part of the std namespace and is not included with #include <memory>.
Do you know where it is? Did I miss the deprecation memo 😉
You either need
std::static_pointer_castorstd::dynamic_pointer_cast, depending on whether you wantstatic_castordynamic_castbehavior.Recent versions of Boost’s Smart Pointers library include these functions for
boost::shared_ptrtoo.