在线文档教程
C++

std::atomic::store

STD::原子::存储

(since C++11)
void store( T desired, std::memory_order order = std::memory_order_seq_cst
void store( T desired, std::memory_order order = std::memory_order_seq_cst ) volatile;

原子化地将当前值替换为desired的值影响内存。order...

order一定是std::memory_order_relaxed,,,std::memory_order_releasestd::memory_order_seq_cst否则,行为是未定义的。

参数

desired-the value to store into the atomic variable
order-memory order constraints to enforce

返回值

%280%29

例外

noexcept规格:

noexcept

另见

operator=stores a value into an atomic object (public member function)
atomic_storeatomic_store_explicit (C++11)(C++11)atomically replaces the value of the atomic object with a non-atomic argument (function template)

© cppreference.com

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

http://en.cpPreference.com/w/cpp/原子/存储