function
<atomic>
std::atomic_load_explicit
template (1) |
template <class T>
T atomic_load_explicit (const volatile atomic<T>* obj, memory_order sync) noexcept;
template <class T>
T atomic_load_explicit (const atomic<T>* obj, memory_order sync) noexcept;
|
---|
overloads (2) |
T atomic_load_explicit (const volatile A* obj, memory_order sync) noexcept;
T atomic_load_explicit (const A* obj, memory_order sync) noexcept; |
---|
Read contained value (explicit memory order)
Parameters
- obj
- Pointer to an atomic object.
Type A represents other overloaded atomic types (if the library does not implement the C-style atomic types as instantiations of atomic).
- sync
- Synchronization mode for the operation.
This shall be one of the following values of the enum
type memory_order:
Return value
The contained value.
T is the type of the contained value (atomic's template parameter).
Data races
No data races (atomic operation). Memory order specified by argument sync.
Exception safety
No-throw guarantee: never throws exceptions.