atomic::fetch_and 方法
在一个值和存储在 *this 对象的现有值上执行按位 and。
Ty atomic<Ty>::fetch_and (
Ty Value,
memory_order Order = memory_order_seq_cst
) volatile _NOEXCEPT;
Ty atomic<Ty>::fetch_and (
Ty Value,
memory_order Order = memory_order_seq_cst
) _NOEXCEPT;
参数
Value
一个 Ty 类型的值。Order
内存顺序。
返回值
Ty 对象包含按位后的结果 and.
备注
fetch_and 方法执行 read-modify-write 操作替换存储在*this 中的值按位 and 的 Value ,当前值存储在 *this中,由 Order指定的约束范围内.
要求
**标头:**原子
命名空间: std