Standard library header <stdatomic.h> (C++23)
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Standard library headers
<compare> (C++20)
<contracts> (C++26)
<coroutine> (C++20)
<cstdint> (C++11)
<source_location> (C++20)
<stdfloat> (C++23)
<version> (C++20)
<concepts> (C++20)
<debugging> (C++26)
<stacktrace> (C++23)
<system_error> (C++11)
<memory_resource> (C++17)
<scoped_allocator> (C++11)
<type_traits> (C++11)
<ratio> (C++11)
<any> (C++17)
<bit> (C++20)
<charconv> (C++17)
<expected> (C++23)
<format> (C++20)
<optional> (C++17)
<stdbit.h> (C++26)
<tuple> (C++11)
<typeindex> (C++11)
<variant> (C++17)
<array> (C++11)
<flat_map> (C++23)
<flat_set> (C++23)
<forward_list> (C++11)
<hive> (C++26)
<mdspan> (C++23)
<span> (C++20)
<unordered_map> (C++11)
<unordered_set> (C++11)
<generator> (C++23)
<ranges> (C++20)
<cuchar> (C++11)
<string_view> (C++17)
<codecvt> (C++11/17/26*)
<regex> (C++11)
<cfenv> (C++11)
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<stdckdint.h> (C++26)
<chrono> (C++11)
<ccomplex> (C++11/17/20*)
<ciso646> (until C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
<cinttypes> (C++11)
<filesystem> (C++17)
<print> (C++23)
<spanstream> (C++23)
<strstream> (C++98/26*)
<syncstream> (C++20)
<atomic> (C++11)
<barrier> (C++20)
<condition_variable> (C++11)
<future> (C++11)
<hazard_pointer> (C++26)
<latch> (C++20)
<mutex> (C++11)
<rcu> (C++26)
<semaphore> (C++20)
<shared_mutex> (C++14)
<stdatomic.h> (C++23)
<stop_token> (C++20)
<thread> (C++11)
<execution> (C++17)
This header was originally in the C standard library (<stdatomic.h>).
This header is part of the concurrency support library.
It is unspecified whether <stdatomic.h>
provides any declarations in namespace std.
Contents
Macros
(C++23)
(function macro) [edit]
Types
Functions
(C++11)(C++11)
(function template) [edit]
(C++11)(C++11)
(function template) [edit]
(C++11)(C++11)(C++11)(C++11)
(function template) [edit]
(C++11)(C++11)
(function template) [edit]
(C++11)(C++11)
(function template) [edit]
(C++11)(C++11)
(function template) [edit]
(C++11)(C++11)
(function template) [edit]
(C++11)(C++11)
(function template) [edit]
[edit] Synopsis
template<class T> using __std_atomic = std::atomic <T>; // exposition only #define _Atomic(T) __std_atomic<T> #define ATOMIC_BOOL_LOCK_FREE /* see description */ #define ATOMIC_CHAR_LOCK_FREE /* see description */ #define ATOMIC_CHAR16_T_LOCK_FREE /* see description */ #define ATOMIC_CHAR32_T_LOCK_FREE /* see description */ #define ATOMIC_WCHAR_T_LOCK_FREE /* see description */ #define ATOMIC_SHORT_LOCK_FREE /* see description */ #define ATOMIC_INT_LOCK_FREE /* see description */ #define ATOMIC_LONG_LOCK_FREE /* see description */ #define ATOMIC_LLONG_LOCK_FREE /* see description */ #define ATOMIC_POINTER_LOCK_FREE /* see description */ using std::memory_order ; // see description using std::memory_order_relaxed ; // see description using std::memory_order_consume ; // see description using std::memory_order_acquire ; // see description using std::memory_order_release ; // see description using std::memory_order_acq_rel ; // see description using std::memory_order_seq_cst ; // see description using std::atomic_flag ; // see description using std::atomic_bool ; // see description using std::atomic_char ; // see description using std::atomic_schar ; // see description using std::atomic_uchar ; // see description using std::atomic_short ; // see description using std::atomic_ushort ; // see description using std::atomic_int ; // see description using std::atomic_uint ; // see description using std::atomic_long ; // see description using std::atomic_ulong ; // see description using std::atomic_llong ; // see description using std::atomic_ullong ; // see description using std::atomic_char8_t ; // see description using std::atomic_char16_t ; // see description using std::atomic_char32_t ; // see description using std::atomic_wchar_t ; // see description using std::atomic_int8_t ; // see description using std::atomic_uint8_t ; // see description using std::atomic_int16_t ; // see description using std::atomic_uint16_t ; // see description using std::atomic_int32_t ; // see description using std::atomic_uint32_t ; // see description using std::atomic_int64_t ; // see description using std::atomic_uint64_t ; // see description using std::atomic_int_least8_t ; // see description using std::atomic_uint_least8_t ; // see description using std::atomic_int_least16_t ; // see description using std::atomic_uint_least16_t ; // see description using std::atomic_int_least32_t ; // see description using std::atomic_uint_least32_t ; // see description using std::atomic_int_least64_t ; // see description using std::atomic_uint_least64_t ; // see description using std::atomic_int_fast8_t ; // see description using std::atomic_uint_fast8_t ; // see description using std::atomic_int_fast16_t ; // see description using std::atomic_uint_fast16_t ; // see description using std::atomic_int_fast32_t ; // see description using std::atomic_uint_fast32_t ; // see description using std::atomic_int_fast64_t ; // see description using std::atomic_uint_fast64_t ; // see description using std::atomic_intptr_t ; // see description using std::atomic_uintptr_t ; // see description using std::atomic_size_t ; // see description using std::atomic_ptrdiff_t ; // see description using std::atomic_intmax_t ; // see description using std::atomic_uintmax_t ; // see description using std::atomic_is_lock_free ; // see description using std::atomic_load ; // see description using std::atomic_load_explicit ; // see description using std::atomic_store ; // see description using std::atomic_store_explicit ; // see description using std::atomic_exchange ; // see description using std::atomic_exchange_explicit ; // see description using std::atomic_compare_exchange_strong ; // see description using std::atomic_compare_exchange_strong_explicit ; // see description using std::atomic_compare_exchange_weak ; // see description using std::atomic_compare_exchange_weak_explicit ; // see description using std::atomic_fetch_add ; // see description using std::atomic_fetch_add_explicit ; // see description using std::atomic_fetch_sub ; // see description using std::atomic_fetch_sub_explicit ; // see description using std::atomic_fetch_or ; // see description using std::atomic_fetch_or_explicit ; // see description using std::atomic_fetch_xor ; // see description using std::atomic_fetch_xor_explicit ; // see description using std::atomic_fetch_and ; // see description using std::atomic_fetch_and_explicit ; // see description using std::atomic_flag_test_and_set ; // see description using std::atomic_flag_test_and_set_explicit ; // see description using std::atomic_flag_clear ; // see description using std::atomic_flag_clear_explicit ; // see description #define ATOMIC_FLAG_INIT /* see description */ using std::atomic_thread_fence ; // see description using std::atomic_signal_fence ; // see description