Public Types | |
| using | element_type = TTarget |
Public Member Functions | |
| intrusive_ptr (intrusive_ptr &&rhs) noexcept | |
| template<class From , class FromNullType > | |
| intrusive_ptr (intrusive_ptr< From, FromNullType > &&rhs) noexcept | |
| intrusive_ptr (const intrusive_ptr &rhs) | |
| template<class From , class FromNullType > | |
| intrusive_ptr (const intrusive_ptr< From, FromNullType > &rhs) | |
| intrusive_ptr & | operator= (intrusive_ptr &&rhs)&noexcept |
| template<class From , class FromNullType > | |
| intrusive_ptr & | operator= (intrusive_ptr< From, FromNullType > &&rhs)&noexcept |
| intrusive_ptr & | operator= (const intrusive_ptr &rhs)&noexcept |
| template<class From , class FromNullType > | |
| intrusive_ptr & | operator= (const intrusive_ptr< From, NullType > &rhs)& |
| TTarget * | get () const noexcept |
| const TTarget & | operator* () const noexcept |
| TTarget & | operator* () noexcept |
| const TTarget * | operator-> () const noexcept |
| TTarget * | operator-> () noexcept |
| operator bool () const noexcept | |
| void | reset () noexcept |
| void | swap (intrusive_ptr &rhs) noexcept |
| bool | defined () const noexcept |
| size_t | use_count () const noexcept |
| size_t | weak_use_count () const noexcept |
| bool | unique () const noexcept |
| TTarget * | release () noexcept |
| Returns an owning (!) pointer to the underlying object and makes the intrusive_ptr instance invalid. More... | |
Static Public Member Functions | |
| static intrusive_ptr | reclaim (TTarget *owning_ptr) |
| Takes an owning pointer to TTarget* and creates an intrusive_ptr that takes over ownership. More... | |
| template<class... Args> | |
| static intrusive_ptr | make (Args &&...args) |
| static intrusive_ptr | unsafe_reclaim_from_nonowning (TTarget *raw_ptr) |
| Turn a non-owning raw pointer to an intrusive_ptr. More... | |
Friends | |
| template<class TTarget2 , class NullType2 > | |
| class | intrusive_ptr |
| class | weak_intrusive_ptr< TTarget, NullType > |
Definition at line 149 of file intrusive_ptr.h.
|
inlinestatic |
Takes an owning pointer to TTarget* and creates an intrusive_ptr that takes over ownership.
That means the refcount is not increased. This is the counter-part to intrusive_ptr::release() and the pointer passed in must have been created using intrusive_ptr::release().
Definition at line 346 of file intrusive_ptr.h.
|
inlinenoexcept |
Returns an owning (!) pointer to the underlying object and makes the intrusive_ptr instance invalid.
That means the refcount is not decreased. You must put the returned pointer back into a intrusive_ptr using intrusive_ptr::reclaim(ptr) to properly destruct it. This is helpful for C APIs.
Definition at line 334 of file intrusive_ptr.h.
|
inlinestatic |
Turn a non-owning raw pointer to an intrusive_ptr.
This method is potentially dangerous (as it can mess up refcount).
Definition at line 371 of file intrusive_ptr.h.
1.8.11