Christian Mazakas wrote:
It's funny that SmartPtr is being brought up so much because SmartPtr contains a few key things not found in the STL. First and foremost, intrusive_ptr.
I've built an entire I/O runtime using intrusive_ptr as it's more suited for low- level C APIs than the two word smart pointer impls are.
For that reason, SmartPtr should never really die or go away or attempt to be replaced. SmartPtr is also the only place you'll find `allocate_unique`.
I don't understand the hate for SmartPtr either. In addition to things that aren't
in std at all, such as
* intrusive_ptr
* local_shared_ptr
* enable_shared_from
* allocate_unique
* owner_equal_to
* owner_hash
(and probably others that don't come to mind at the moment)
some features aren't part of C++11 but have only been added in later standards,
such as
* shared_ptr