An intrusive, reference counting smart pointer implementation with copy-on-write optimization.
More...
#include <intrusive_cow_ptr.hpp>
|
using | pointer = T * |
|
using | const_pointer = const T * |
|
using | element_type = T |
|
using | reference = T & |
|
using | const_reference = const T & |
|
using | counting_pointer = intrusive_ptr< T > |
|
|
| 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 |
|
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 T>
class caf::intrusive_cow_ptr< T >
An intrusive, reference counting smart pointer implementation with copy-on-write optimization.
◆ detach()
Returns the raw pointer without modifying reference count and sets this to nullptr
.
◆ release()
Returns the raw pointer without modifying reference count and sets this to nullptr
.
◆ unshare()
Forces a copy of the managed object unless it already has a reference count of exactly 1.
◆ to_string()
The documentation for this class was generated from the following files:
- libcaf_core/caf/fwd.hpp
- libcaf_core/caf/intrusive_cow_ptr.hpp