std::atomic_ref::fetch_or(3)
π std::atomic_ref::fetch_or(3) π
okay so bestie, welcome to the manual page for std::atomic_ref::fetch_or, straight outta the C++ Standard Libary (yes, that spelling is doing its own thing π). it's giving atomic-OR main character energy, and we're gonna get you comfy with it. no cap.
πΈ NAME πΈ
std::atomic_ref::fetch_or - std::atomic_ref::fetch_or
π¦ Synopsis π¦
member only of atomic_ref<Integral> specializations
T fetch_or( T arg,
std::memory_order order = std::memory_order_seq_cst )
(since C++20)
const noexcept;
so what's the tea? it atomically replaces the current value of the referenced object with the result of bitwise OR of the value and arg. this operation is a read-modify-write operation, periodt. memory is affected according to the value of order. β¨
π Parameters π
argβ the other argument of bitwise OR. literally the other side of the OR moment π«Άorderβ memory order constraints to enforce. the vibe check for memory ordering π
β¨ Return value β¨
the value of the referenced object, immediately preceding the effects of this function. iykyk β it's the value from right before this function did its thing π
cute sign-off, bestie: source/version/date = http://cppreference.com Β· 2024.06.10 π mwah π
π¦ 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