std::atomic_ref<T>::load
From cppreference.com
< cpp | atomic | atomic ref
C++
Concurrency support library
|
|
std::atomic_ref
value_type load(std::memory_order order = std::memory_order_seq_cst)constnoexcept; | (constexpr since C++26) | |
Atomically loads and returns the current value of the referenced object. Memory is affected according to the value of order.
If order is not std::memory_order_relaxed, std::memory_order_consume, std::memory_order_acquire or std::memory_order_seq_cst, the behavior is undefined.
[edit]Parameters
order | - | memory order constraints to enforce |
[edit]Return value
The current value of the referenced object.
[edit]See also
loads a value from the referenced object (public member function)[edit] |