|
MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
引用类型的原子特化 更多...
#include <atomic.hpp>
Public 类型 | |
| using | value_type |
| 值类型 | |
Public 成员函数 | |
| operator T () const noexcept | |
| 类型转换运算符 | |
| bool | is_lock_free () const noexcept |
| 检查是否支持无锁操作 | |
| void | store (T value, const memory_order mo=memory_order_seq_cst) noexcept |
| 原子存储操作 | |
| T | load (const memory_order mo=memory_order_seq_cst) const noexcept |
| 原子加载操作 | |
| T | exchange (T value, const memory_order mo=memory_order_seq_cst) noexcept |
| 原子交换操作 | |
| bool | compare_exchange_weak (T &expected, T desired, const memory_order success, const memory_order failure) noexcept |
| 弱比较交换操作 | |
| bool | compare_exchange_strong (T &expected, T desired, const memory_order success, const memory_order failure) noexcept |
| 强比较交换操作 | |
静态 Public 属性 | |
| static constexpr bool | is_always_lock_free |
| 是否总是无锁 | |
|
inlinenoexcept |
强比较交换操作
| expected | 期望值 |
| desired | 期望设置的值 |
| success | 成功时的内存顺序 |
| failure | 失败时的内存顺序 |
在文件 atomic.hpp 第 217 行定义.
|
inlinenoexcept |
弱比较交换操作
| expected | 期望值 |
| desired | 期望设置的值 |
| success | 成功时的内存顺序 |
| failure | 失败时的内存顺序 |
在文件 atomic.hpp 第 174 行定义.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |