C++ Atomic Library - load


Advertisements

Description

It atomically obtains the value stored in an atomic object.

Declaration

Following is the declaration for std::atomic_load.

template< class T >
T atomic_load( const std::atomic<T>* obj );

C++11

template< class T >
T atomic_load( const volatile std::atomic<T>* obj );

Parameters

  • obj − It is used in pointer to the atomic object to modify.

  • order − It is used synchronise the memory ordering for this operation.

Return Value

It returns the value that is held by the atomic object pointed to by obj.

Exceptions

No-noexcept − this member function never throws exceptions.

atomic.htm
Advertisements