C++ Atomic Library - store



Description

It atomically replaces the value of the atomic object with a non-atomic argument.

Declaration

Following is the declaration for std::atomic_store.

template< class T >
void atomic_store( volatile std::atomic<T>* obj, T desr );

C++11

template< class T >
void atomic_store( std::atomic<T>* obj, T desr );

Parameters

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

  • desr − It is used to store the value in the atomic object.

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

Return Value

none

Exceptions

No-noexcept − this member function never throws exceptions.

atomic.htm
Advertisements