首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::atomic::fetch_and

?

?

(since C++11) (member only of atomic<Integral> template specialization)

T fetch_and( T arg, std::memory_order order = std::memory_order_seq_cst );

?

?

T fetch_and( T arg, std::memory_order order = std::memory_order_seq_cst ) volatile;

?

?

原子化地将当前值替换为按位和值的结果,以及arg.操作是读-修改-写操作.。的值影响内存。order...

参数

arg

-

the other argument of bitwise AND

order

-

memory order constraints to enforce

返回值

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

例外

noexcept规格:

noexcept

另见

atomic_fetch_andatomic_fetch_and_explicit (C++11)(C++11)

replaces the atomic object with the result of logical AND with a non-atomic argument and obtains the previous value of the atomic (function template)

代码语言:txt
复制
 ? cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com