A wrapper around a possible atomic value. More...
#include <atomic_optional.h>
Public Member Functions | |
constexpr | AtomicOptional (T value) noexcept |
Constructor. More... | |
AtomicOptional & | operator= (const AtomicOptional &other)=delete |
AtomicOptional & | operator= (T value) noexcept |
void | Reset () noexcept |
Reset the instance atomic value. | |
bool | HasValue () const noexcept |
Indicate whether the instance has an atomic value or not. More... | |
T | Value () const |
Get instance possible non-atomic value. More... | |
A wrapper around a possible atomic value.
T | Possible non-atomic value type |
|
inlineconstexprnoexcept |
Constructor.
value | Desired non-atomic value |
|
inlinenoexcept |
Indicate whether the instance has an atomic value or not.
|
inline |
Get instance possible non-atomic value.
std::runtime_error | Throws if there is no value |