struct A has no virtual methods (not even a destructor), so you can't dynamic_cast from A* - only pointers to types with at least one virtual member function can be used dynamic_cast on. boost::dynamic_pointer_cast does dynamic_cast inside, to it's subject to same requirements.