在线文档教程
C++

std::atomic::fetch_or

STD::原子::获取[医]或

(since C++11) (member only of atomic 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;

将当前值替换为值的按位OR的结果,arg.操作是读-修改-写操作.。的值影响内存。order...

参数

arg-the other argument of bitwise OR
order-memory order constraints to enforce

返回值

中此函数的效果之前的值。修改顺序成*this...

例外

noexcept规格:

noexcept

另见

atomic_fetch_oratomic_fetch_or_explicit (C++11)(C++11)replaces the atomic object with the result of logical OR with a non-atomic argument and obtains the previous value of the atomic (function template)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cpPreference.com/w/cpp/原子/原子/FETCH[医]或