It can help to look at std::unique_ptr
and std::shared_ptr
in the form of ownership instead of as pointers: std::unique_ptr
when something can only have one owner at a time, and std::shared_pointer
when something can be shared.
Note that since C++11 (which introduced the other smart pointers) std::auto_ptr
has been deprecated.