std::atomic_ref::fetch_and(3)
πΈ NAME πΈ
okay so welcome to std::atomic_ref::fetch_and(3) from the C++ Standard Libary β yep, thatβs the manual name as written here, and weβre keeping it exact, no cap π
. The NAME is std::atomic_ref::fetch_and β std::atomic_ref::fetch_and, same energy, same function, iconic behavior β¨.
β¨ Synopsis β¨
Quick vibe check: this is a member only of atomic_ref<Integral> specializations π«Ά.
T fetch_and( T arg,
std::memory_order order = std::memory_order_seq_cst )
const noexcept;
(since C++20) β dated, slay, periodt π.
Hereβs the tea: it atomically replaces the current value of the referenced object with the result of bitwise AND of the value and arg π₯. This operation is a read-modify-write operation, bestie β not a drive-by read. Memory is affected according to the value of order β¨.
π Parameters π
argβ the other argument of bitwise AND πorderβ memory order constraints to enforce, fr fr β¨
π Return value π
The value of the referenced object, immediately preceding the effects of this function β like, the value right before this functionβs effects show up, no cap π.
cute sign-off: source/version is http://cppreference.com, the date stamp is 2024.06.10, and the page is std::atomic_ref::fetch_and(3) ππ
π¦ 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