std::atomic_ref::store(3)
π NAME π
std::atomic_ref::store(3) β the page from the C++ Standard Libary manual where std::atomic_ref::store lives. Bestie, it's the member that stores a value atomically into the referenced object. Periodt. β¨
π Synopsis π
Here's the exact signature, no edits, iykyk:
void store( T desired, std::memory_order order =
(since C++20)
std::memory_order_seq_cst ) const noexcept;
This one is noexcept, and the (since C++20) note is right there in the signature. It atomically replaces the current value of the referenced object with desired. Memory is affected according to the value of order. π
π¨ Warning bestie:ordermust be one ofstd::memory_order_relaxed,std::memory_order_releaseorstd::memory_order_seq_cst. Otherwise the behavior is undefined. Not me being dramatic β it's literally in the page. π
π Parameters π
desiredβ the value to store into the referenced object. πorderβ memory order constraints to enforce. π§
π Return value π
(none)β literally nothing comes back. Iconic. β¨
π See also π
operator=β stores a value into the object referenced by anatomic_refobject (public member function). π
Cute sign-off: this page is from http://cppreference.com, dated 2024.06.10, and it's the std::atomic_ref::store(3) page. Bye bestie, go store something atomically. ππ¦
π¦ 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