std::atomic_load, std::atomic_load_explicit
Min standard notice:
Header: <atomic>
1,2) Atomically obtains the value pointed to by obj as if by obj->load().
# Declarations
template< class T >
T atomic_load( const std::atomic<T>* obj ) noexcept;
(since C++11)
template< class T >
T atomic_load( const volatile std::atomic<T>* obj ) noexcept;
(since C++11)
template< class T >
T atomic_load_explicit( const std::atomic<T>* obj,
std::memory_order order ) noexcept;
(since C++11)
template< class T >
T atomic_load_explicit( const volatile std::atomic<T>* obj,
std::memory_order order ) noexcept;
(since C++11)
# Parameters
obj: pointer to the atomic object to modifyorder: the memory synchronization ordering for this operation
# Return value
The value that is held by the atomic object pointed to by obj.