std::atomic_ref::fetch_xor(3)
π NAME π β std::atomic_ref::fetch_xor(3)
okay so this is the std::atomic_ref::fetch_xor page from the C++ Standard Libary manual π
(yes bestie, that's the manual name up top). The function itself is std::atomic_ref::fetch_xor β std::atomic_ref::fetch_xor, periodt.
π₯ Synopsis π₯
it's a member only of atomic_ref<Integral> specializations, and the signature is giving exactly this:
member only of atomic_ref<Integral> specializations
T fetch_xor( T arg,
std::memory_order order = std::memory_order_seq_cst )
(since C++20)
const noexcept;
so what does it do? Atomically replaces the current value of the referenced object with the result of bitwise XOR of the value and arg. This operation is a read-modify-write operation. Memory is affected according to the value of order β¨.
π Parameters π
argβ the other argument of bitwise XOR. that's the second little XOR bestie in the mix πorderβ memory order constraints to enforce. it's the memory-ordering vibe check π«Ά
π Return value π
The value of the referenced object, immediately preceding the effects of this function. so you get the value from right before this function did its thing, no cap ππ
source: http://cppreference.com Β· date: 2024.06.10 Β· page: std::atomic_ref::fetch_xor(3) β mwah, 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