How does one downcast a std::shared_ptr? February 3, 2023 by Tarik This ought to work: if (ptr->IsChildOne()) { SomeClientExpectingAChildOne(std::static_pointer_cast<ChildOne>(ptr)); }