|
| ref_counted (Deleter const &d) noexcept |
| Creates a new ref_counted with a custom deleter.
|
|
| ref_counted (Deleter &&d) noexcept |
| Creates a new ref_counted with a custom deleter. More...
|
|
constexpr | ref_counted (long count) noexcept |
| Creates a new ref_counted with an arbitrary initial count.
|
|
| ref_counted (long count, Deleter const &d) noexcept |
| Creates a new ref_counted with an arbitrary initial count and a custom deleter.
|
|
| ref_counted (long count, Deleter &&d) noexcept |
| Creates a new ref_counted with an arbitrary initial count and a custom deleter. More...
|
|
void | add_ref (long count=1, std::memory_order order=std::memory_order_relaxed) noexcept |
| Increases the reference count by count .
|
|
long | remove_ref (long count=1, std::memory_order order=std::memory_order_relaxed) noexcept |
| Decreases the reference count by count . More...
|
|
bool | release (std::memory_order order=std::memory_order_relaxed) noexcept |
| Decreases the reference count, destroying the object if it reached 0. More...
|
|
long | use_count (std::memory_order order=std::memory_order_relaxed) const noexcept |
|
bool | unique (std::memory_order order=std::memory_order_relaxed) const noexcept |
|
template<typename T, typename Deleter = std::default_delete<T>>
class stapl::runtime::ref_counted< T, Deleter >
Provides a reference counting mechanism for objects that derive from it.
- Template Parameters
-
T | Reference counted object type. |
Deleter | Deleter type. |
ref_counted is compatible with boost::intrusive_ptr
.