From the boost library documentation I read this:
Conceptually, smart pointers are seen as owning the object pointed to, and thus responsible for de
It's a bit late, but for future viewers: There's a ready-to-use implementation in my header-only library Aurora and its SmartPtr tutorial. With Aurora, it's trivial to implement deep-copy through smart pointers. The following code works for any copyable type T
:
aurora::CopiedPtr first(new T);
aurora::CopiedPtr second = first; // deep copy
This makes it often unnecessary to implement The Big Three/Five if your classes have pointer members.