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::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_and

(since C++11) (member only of atomic<Integral> template specialization) T fetch_and( T arg, std::memory_order order = std::memory_order_seq_cst ); T fetch_and( T arg, std::memory_order order = std::memory_order_seq_cst ) volatile; Atomically replaces the current value with the result of bitwise AND 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::fetch_add

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

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::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,

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::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

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