std::atomic::store(3)
πΎ std::atomic::store(3) πΎ
okay so welcome to the C++ Standard Libary manual, bestie β this page is std::atomic::store(3) and she is here to atomically replace stuff π
β¨
π NAME π
std::atomic::store - std::atomic::store
(no cap, that's the whole name section, she's concise like that π«Ά)
β¨ Synopsis β¨
void store( T desired, std::memory_order order =
std::memory_order_seq_cst ) noexcept;
Overload (1), since C++11 πΈ
void store( T desired, std::memory_order order =
std::memory_order_seq_cst ) volatile
noexcept;
Overload (2), since C++11 πΈ
Atomically replaces the current value with desired. Memory is affected according to the value of order.
π¨ iforderis one ofstd::memory_order_consume,std::memory_order_acquireandstd::memory_order_acq_rel, the behavior is undefined. That's not a vibe, bestie β do not do it π
π Since C++20, it is deprecated ifstd::atomic<T>::is_always_lock_freeis false and overload(2)participates in overload resolution. That's the caveat, fr fr.
πΈ Parameters πΈ
desiredβ the value to store into the atomic variable πorderβ memory order constraints to enforce π
π¦ Return value π¦
(none) β literally no return value, she's not giving anything back and that's the point π
π See also π
operator=β stores a value into an atomic object (public member function)atomic_storeβ atomically replaces the value of the atomic object with a non-atomic argument (C++11) (function template)atomic_store_explicitβ atomically replaces the value of the atomic object with a non-atomic argument (C++11) (function template)
source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::atomic::store(3) β mwah, bye bestie π«Άπ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms