It atomically obtains the value stored in an atomic object.
Following is the declaration for std::atomic_load.
template< class T > T atomic_load( const std::atomic<T>* obj );
template< class T > T atomic_load( const volatile std::atomic<T>* obj );
obj − It is used in pointer to the atomic object to modify.
order − It is used synchronise the memory ordering for this operation.
It returns the value that is held by the atomic object pointed to by obj.
No-noexcept − this member function never throws exceptions.