CopiedPtr policy that performs a deep copy depending on the object's dynamic type. More...
CopiedPtr policy that performs a deep copy depending on the object's dynamic type.
If the pointee shall be copied every time the smart pointer is copied, you can use this template. This performs a dynamic copy, the called copy constructor isn't necessarily T::T(const T&). The prerequisite to allow this wizardry is that you pass a pointer to the actual dynamic type when invoking the CopiedPtr::CopiedPtr(U*) constructor or the CopiedPtr::Reset(U*) member function.