An intrusive, reference counting smart pointer implementation with copy-on-write optimization.
More...
|
| intrusive_cow_ptr (intrusive_cow_ptr &&) noexcept=default |
|
| intrusive_cow_ptr (const intrusive_cow_ptr &) noexcept=default |
|
| intrusive_cow_ptr (std::nullptr_t) noexcept |
|
template<class Y > |
| intrusive_cow_ptr (intrusive_cow_ptr< Y > other) noexcept |
|
| intrusive_cow_ptr (counting_pointer p) noexcept |
|
| intrusive_cow_ptr (pointer ptr, bool add_ref=true) noexcept |
|
intrusive_cow_ptr & | operator= (intrusive_cow_ptr &&) noexcept=default |
|
intrusive_cow_ptr & | operator= (const intrusive_cow_ptr &) noexcept=default |
|
intrusive_cow_ptr & | operator= (counting_pointer x) noexcept |
|
template<class U = T, class... Ts> |
void | emplace (Ts &&... xs) |
|
ptrdiff_t | compare (std::nullptr_t) const noexcept |
|
ptrdiff_t | compare (const_pointer ptr) const noexcept |
|
ptrdiff_t | compare (const counting_pointer &other) const noexcept |
|
ptrdiff_t | compare (const intrusive_cow_ptr &other) const noexcept |
|
void | swap (intrusive_cow_ptr &other) noexcept |
| Swaps the managed object with other .
|
|
void | reset (pointer p=nullptr, bool add_ref=true) noexcept |
| Replaces the managed object.
|
|
pointer | detach () noexcept |
| Returns the raw pointer without modifying reference count and sets this to nullptr . More...
|
|
pointer | release () noexcept |
| Returns the raw pointer without modifying reference count and sets this to nullptr . More...
|
|
void | unshare () |
| Forces a copy of the managed object unless it already has a reference count of exactly 1. More...
|
|
pointer | unshared_ptr () |
| Returns a mutable pointer to the managed object.
|
|
reference | unshared () |
| Returns a mutable reference to the managed object.
|
|
const_pointer | get () const noexcept |
| Returns a read-only pointer to the managed object.
|
|
const counting_pointer & | counting_ptr () const noexcept |
| Returns the intrusive pointer managing the object.
|
|
const_pointer | operator-> () const noexcept |
| Returns a read-only pointer to the managed object.
|
|
const_reference | operator* () const noexcept |
| Returns a read-only reference to the managed object.
|
|
| operator bool () const noexcept |
|
template<class C > |
intrusive_cow_ptr< C > | downcast () const noexcept |
|
template<class C > |
intrusive_cow_ptr< C > | upcast () const noexcept |
|
template<class T>
class caf::intrusive_cow_ptr< T >
An intrusive, reference counting smart pointer implementation with copy-on-write optimization.