I have a class B that inherits from A, which in turn comes from enabled_shared_from_this. Now I want to get a generic pointer to B from an instance of B. shared_from_thiswill return shared_ptr<A>, not shared_ptr<B>. Should I use boost::static_pointer_casthere? Or is there a better way?
source
share