std::atomic::fetch_xor(3)
πΈ std::atomic::fetch_xor(3) πΈ
okay so bestie, this is the C++ Standard Libary manual page for std::atomic::fetch_xor β yes, thatβs how the manual name is spelled in the header, no cap π. Itβs giving atomic bit-flipping main character energy β¨.
π NAME π
std::atomic::fetch_xor β literally std::atomic::fetch_xor, periodt π
.
π¦ Synopsis π¦
okay so this one is a member only of atomic<Integral > specializations:
T fetch_xor( T arg, std::memory_order order =
(1) (since C++11)
std::memory_order_seq_cst ) noexcept;
T fetch_xor( T arg, std::memory_order order =
std::memory_order_seq_cst ) volatile
(2) (since C++11)
noexcept;
Atomically replaces the current value with the result of bitwise XOR of the value and arg π₯. The operation is a read-modify-write operation, and memory is affected according to the value of order.
deprecated alert, bestie: since C++20, it is deprecated ifstd::atomic<T>::is_always_lock_freeisfalseand overload(2)participates in overload resolution. So if that condition hits, itβs deprecated β not cute, but true π.
π Parameters π
argβ the other argument of bitwise XOR.orderβ memory order constraints to enforce.
π Return value π
It returns the value immediately preceding the effects of this function in the modification order of *this π«Ά.
π See also π
atomic_fetch_xorβ replaces the atomic object with the result of bitwise XOR.atomic_fetch_xor_explicitβ with a non-atomic argument and obtains the previous value of the atomic.(C++11),(C++11),(function template)β the version and function-template tags from the original See also table, all present and accounted for π .
mwah π β source: http://cppreference.com, version/date: 2024.06.10.
π¦ 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