|
tenno 0.1.0
|
A weak pointer. More...
#include <memory.hpp>
Public Types | |
| using | element_type = T |
| The type of the object to point to. | |
Public Member Functions | |
| constexpr | weak_ptr () noexcept |
| Default constructor. | |
| weak_ptr (const weak_ptr &r) noexcept | |
| Copy constructor. | |
| weak_ptr (weak_ptr &&r) noexcept | |
| Move constructor. | |
| weak_ptr (const tenno::shared_ptr< T > &r) noexcept | |
| Construct a new weak pointer object. | |
| ~weak_ptr () | |
| Destructor. | |
| weak_ptr & | operator= (const weak_ptr &r) noexcept |
| Copy assignment operator. | |
| weak_ptr & | operator= (const shared_ptr< T > &r) noexcept |
| Move assignment operator. | |
| weak_ptr & | operator= (weak_ptr &&r) noexcept |
| Move assignment operator. | |
| void | reset () noexcept |
| Reset the weak pointer. | |
| void | swap (weak_ptr &r) noexcept |
| Swap the weak pointer with another weak pointer. | |
| long | use_count () const noexcept |
| Get the number of shared pointers pointing to the object. | |
| bool | expired () const noexcept |
| Check if the weak pointer is empty. | |
| tenno::shared_ptr< T > | lock () const noexcept |
| Lock the weak pointer. | |
| template<class Y > | |
| bool | owner_before (const weak_ptr< Y > &other) const noexcept |
| Stored value ordering. | |
| template<class Y > | |
| bool | owner_before (const tenno::shared_ptr< Y > &other) const noexcept |
| Stored value ordering. | |
| template<class Y > | |
| bool | owner_equal (const tenno::shared_ptr< Y > &other) const noexcept |
| Stored value equality. | |
A weak pointer.
| T | The type of the object to point to |
Definition at line 530 of file memory.hpp.
| using tenno::weak_ptr< T >::element_type = T |
The type of the object to point to.
Definition at line 536 of file memory.hpp.
|
inlineconstexprnoexcept |
Default constructor.
Definition at line 541 of file memory.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Construct a new weak pointer object.
| r | The shared pointer to copy |
Definition at line 589 of file memory.hpp.
|
inline |
Destructor.
Definition at line 606 of file memory.hpp.
|
inlinenoexcept |
Check if the weak pointer is empty.
Definition at line 757 of file memory.hpp.
|
inlinenoexcept |
Lock the weak pointer.
Definition at line 769 of file memory.hpp.
|
inlinenoexcept |
Move assignment operator.
| r | The weak pointer to move |
Definition at line 657 of file memory.hpp.
|
inlinenoexcept |
Copy assignment operator.
| r | The weak pointer to copy |
Definition at line 626 of file memory.hpp.
|
inlinenoexcept |
Move assignment operator.
| r | The weak pointer to move |
Definition at line 688 of file memory.hpp.
|
inlinenoexcept |
Stored value ordering.
| other | The shared pointer to compare with |
Definition at line 806 of file memory.hpp.
|
inlinenoexcept |
Stored value ordering.
| other | The weak pointer to compare with |
Definition at line 787 of file memory.hpp.
|
inlinenoexcept |
Stored value equality.
| other | The weak pointer to compare with |
Definition at line 819 of file memory.hpp.
|
inlinenoexcept |
Reset the weak pointer.
Definition at line 716 of file memory.hpp.
|
inlinenoexcept |
Swap the weak pointer with another weak pointer.
| r | The weak pointer to swap with |
Definition at line 729 of file memory.hpp.
|
inlinenoexcept |
Get the number of shared pointers pointing to the object.
Definition at line 744 of file memory.hpp.