The difference between boost :: scoped_ptr <T> and std :: unique_ptr <T>
The only difference between boost::scoped_ptr<T> and std::unique_ptr<T> the fact that std::unique_ptr<T> has move semantics, while boost::scoped_ptr<T> is just a smart get / reset pointer?
No, but this is the most important difference.
Another significant difference is that unique_ptr can have a destructor object with it, similar to how shared_ptr can. Unlike shared_ptr , the destructor type is part of the unique_ptr type (the way distributors are part of the STL container types).
unique_ptr belongs to the object exclusively. It is not copied , but supports the transfer of ownership . It has been introduced as a replacement for obsolete auto_ptr .
scoped_ptr not copied or movable . This is the preferred option when you want to make sure that pointers are deleted when you exit the scope.