Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2024-03-31 16:07:46


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<T[]> (C++17)
* weak_from_this (C++17)
* make_shared<T[]> (C++20)
* make_unique<T[]> (C++23)

(and probably others.)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk