|
|
using | element_type = T |
|
using | pointer = element_type * |
|
using | reference = element_type & |
|
|
| atomic_unique_ptr (atomic_unique_ptr const &)=delete |
|
atomic_unique_ptr & | operator= (atomic_unique_ptr const &)=delete |
|
| atomic_unique_ptr (atomic_unique_ptr &&other) noexcept |
|
atomic_unique_ptr & | operator= (atomic_unique_ptr &&other) noexcept |
|
constexpr | atomic_unique_ptr (std::nullptr_t) noexcept |
|
atomic_unique_ptr & | operator= (std::nullptr_t) noexcept |
|
constexpr | atomic_unique_ptr (pointer other) noexcept |
|
atomic_unique_ptr & | operator= (pointer other) noexcept |
| pointer | get (std::memory_order order=std::memory_order::seq_cst) const noexcept |
| | Get the raw pointer.
|
| template<typename... Args> |
| reference | get_or_make (Args &&...args) noexcept |
| | Get or make an object.
|
◆ get()
◆ get_or_make()
template<typename T>
template<typename... Args>
Get or make an object.
This function will return a previously created object, or if the internal pointer is null a new element_type is constructed and returned.
It is possible for the element_type to be constructed multiple times during a race, but only one will be returned from this function.
- Parameters
-
| args | The arguments passed to the constructor |
- Returns
- A reference to an existing or just constructed object.
The documentation for this class was generated from the following file: