std::atomic::fetch_sub

(since C++11) (member only of atomic<Integral> template specialization) T fetch_sub( T arg, std::memory_order order = std::memory_order_seq_cst ); T fetch_sub( T arg, std::memory_order order = std::memory_order_seq_cst ) volatile; (since C++11) (member only of atomic<T*> template specialization) T* fetch_sub( std::ptrdiff_t arg, std::memory_order order = std::memory_order_seq_cst ); T* fetch_sub( std::ptrdiff_t ar

std::atomic::fetch_or

(since C++11) (member only of atomic<Integral> template specialization) T fetch_or( T arg, std::memory_order order = std::memory_order_seq_cst ); T fetch_or( T arg, std::memory_order order = std::memory_order_seq_cst ) volatile; Atomically replaces the current value with the result of bitwise OR of the value and arg. The operation is read-modify-write operation. Memory is affected according to the value of order. Parameters arg - the oth

std::atomic::fetch_xor

(since C++11) (member only of atomic<Integral> template specialization) T fetch_xor( T arg, std::memory_order order = std::memory_order_seq_cst ); T fetch_xor( T arg, std::memory_order order = std::memory_order_seq_cst ) volatile; Atomically replaces the current value with the result of bitwise XOR of the value and arg. The operation is read-modify-write operation. Memory is affected according to the value of order. Parameters arg - th

std::atomic::operator T()

(since C++11) operator T() const; operator T() const volatile; Atomically loads and returns the current value of the atomic variable. Equivalent to load(). Parameters (none). Return value The current value of the atomic variable. Exceptions noexcept specification: noexcept See also load (C++11) atomically obtains the value of the atomic object (public member function)

std::atomic::load

(since C++11) T load( std::memory_order order = std::memory_order_seq_cst ) const; T load( std::memory_order order = std::memory_order_seq_cst ) const volatile; Atomically loads and returns the current value of the atomic variable. Memory is affected according to the value of order. order must be one of std::memory_order_relaxed, std::memory_order_consume, std::memory_order_acquire or std::memory_order_seq_cst. Otherwise the behavior is undefined. Parameters order - me

std::atomic::atomic

(since C++11) bool is_lock_free() const; bool is_lock_free() const volatile; Checks whether the atomic operations on all objects of this type are lock-free. Parameters (none). Return value true if the atomic operations on the objects of this type are lock-free, false otherwise. Exceptions noexcept specification: noexcept See also atomic_is_lock_free (C++11) checks if the atomic type's operations are lock-free (function template)

std::atomic::exchange

(since C++11) T exchange( T desired, std::memory_order order = std::memory_order_seq_cst ); T exchange( T desired, std::memory_order order = std::memory_order_seq_cst ) volatile; Atomically replaces the underlying value with desired. The operation is read-modify-write operation. Memory is affected according to the value of order. Parameters desired - value to assign order - memory order constraints to enforce Return value The value of the atomic variable be

std::atomic

Defined in header <atomic> template< class T > struct atomic; (1) (since C++11) template<> struct atomic<Integral>; (2) (since C++11) template< class T > struct atomic<T*>; (3) (since C++11) Each instantiation and full specialization of the std::atomic template defines an atomic type. Objects of atomic types are the only C++ objects that are free from data races; that is, if one thread writes to an atomic object while another thread

std::atomic::atomic

atomic() = default; (1) (since C++11) constexpr atomic( T desired ); (2) (since C++11) atomic( const atomic& ) = delete; (3) (since C++11) Constructs new atomic variable. 1) The default constructor is trivial: no initialization takes place other than zero initialization of static and thread-local objects. std::atomic_init may be used to complete initialization. 2) Initializes the underlying value with desired. The initialization is not atomic. 3) Atomic variables are

std::atomic::compare_exchange_weak

Defined in header <atomic> (1) (since C++11) bool compare_exchange_weak( T& expected, T desired, std::memory_order success, std::memory_order failure ); bool compare_exchange_weak( T& expected, T desired, std::memory_order success, std::memory_order failure ) volatile; (2) (since C++11) bool compare_exchange_weak( T& expected, T desired,