C++ Language/Indirection/SmartPointers/PointerToBaseClass

The pointer-type managed by a smart pointer can be a base class of the actual memory allocation (i.e., std::unique_ptr<CRBase> poUnique(new CRDerived);).

Additional information about using smart pointers in a class hierarchy (includes interactive examples)