Namespaces
Variants

Standard library header <stdatomic.h> (C++23)

From cppreference.net
Standard library headers

该头文件最初属于C标准库( <stdatomic.h> )。

此头文件是 并发支持 库的组成部分。

未指定 <stdatomic.h> 是否在命名空间 std 中提供任何声明。

目录

(C++23)
兼容性宏,使得 _Atomic ( T ) 等同于 std:: atomic < T >
(函数宏)
std::atomic_flag 初始化为 false
(宏常量)

类型

无锁布尔原子类型
(类)
定义原子操作的内存顺序约束
(枚举)
std:: atomic < bool >
(类型别名)
std:: atomic < char >
(类型别名)
std:: atomic < signed char >
(类型别名)
std:: atomic < unsigned char >
(类型别名)
std:: atomic < short >
(类型别名)
std:: atomic < unsigned short >
(类型别名)
(C++11)
std:: atomic < int >
(类型别名)
std:: atomic < unsigned int >
(类型别名)
std:: atomic < long >
(类型别名)
std:: atomic < unsigned long >
(类型别名) <span class="editsection noprint plain

概要

template<class T>
  using __std_atomic = std::atomic<T>;        // 仅用于说明
#define _Atomic(T) __std_atomic<T>
#define ATOMIC_BOOL_LOCK_FREE /* 参见说明 */
#define ATOMIC_CHAR_LOCK_FREE /* 参见说明 */
#define ATOMIC_CHAR16_T_LOCK_FREE /* 参见说明 */
#define ATOMIC_CHAR32_T_LOCK_FREE /* 参见说明 */
#define ATOMIC_WCHAR_T_LOCK_FREE /* 参见说明 */
#define ATOMIC_SHORT_LOCK_FREE /* 参见说明 */
#define ATOMIC_INT_LOCK_FREE /* 参见说明 */
#define ATOMIC_LONG_LOCK_FREE /* 参见说明 */
#define ATOMIC_LLONG_LOCK_FREE /* 参见说明 */
#define ATOMIC_POINTER_LOCK_FREE /* 参见说明 */
using std::memory_order;                // 参见说明
using std::memory_order_relaxed;        // 参见说明
using std::memory_order_consume;        // 参见说明
using std::memory_order_acquire;        // 参见说明
using std::memory_order_release;        // 参见说明
using std::memory_order_acq_rel;        // 参见说明
using std::memory_order_seq_cst;        // 参见说明
using std::atomic_flag;                 // 参见说明
using std::atomic_bool;                 // 参见说明
using std::atomic_char;                 // 参见说明
using std::atomic_schar;                // 参见说明
using std::atomic_uchar;                // 参见说明
using std::atomic_short;                // 参见说明
using std::atomic_ushort;               // 参见说明
using std::atomic_int;                  // 参见说明
using std::atomic_uint;                 // 参见说明
using std::atomic_long;                 // 参见说明
using std::atomic_ulong;                // 参见说明
using std::atomic_llong;                // 参见说明
using std::atomic_ullong;               // 参见说明
using std::atomic_char8_t;              // 参见说明
using std::atomic_char16_t;             // 参见说明
using std::atomic_char32_t;             // 参见说明
using std::atomic_wchar_t;              // 参见说明
using std::atomic_int8_t;               // 参见说明
using std::atomic_uint8_t;              // 参见说明
using std::atomic_int16_t;              // 参见说明
using std::atomic_uint16_t;             // 参见说明
using std::atomic_int32_t;              // 参见说明
using std::atomic_uint32_t;             // 参见说明
using std::atomic_int64_t;              // 参见说明
using std::atomic_uint64_t;             // 参见说明
using std::atomic_int_least8_t;         // 参见说明
using std::atomic_uint_least8_t;        // 参见说明
using std::atomic_int_least16_t;        // 参见说明
using std::atomic_uint_least16_t;       // 参见说明
using std::atomic_int_least32_t;        // 参见说明
using std::atomic_uint_least32_t;       // 参见说明
using std::atomic_int_least64_t;        // 参见说明
using std::atomic_uint_least64_t;       // 参见说明
using std::atomic_int_fast8_t;          // 参见说明
using std::atomic_uint_fast8_t;         // 参见说明
using std::atomic_int_fast16_t;         // 参见说明
using std::atomic_uint_fast16_t;        // 参见说明
using std::atomic_int_fast32_t;         // 参见说明
using std::atomic_uint_fast32_t;        // 参见说明
using std::atomic_int_fast64_t;         // 参见说明
using std::atomic_uint_fast64_t;        // 参见说明
using std::atomic_intptr_t;             // 参见说明
using std::atomic_uintptr_t;            // 参见说明
using std::atomic_size_t;               // 参见说明
using <span