std::atomic_ref::operator=(3)
πΈ NAME πΈ
Okay so this is the manual page for std::atomic_ref::operator=(3), straight from the C++ Standard Libary β yes, that spelling is literally what the page says, bestie ππ
std::atomic_ref::operator= β literally std::atomic_ref::operator= β¨
β¨ Synopsis β¨
T operator=( T desired ) const noexcept; (1) (since C++20)
atomic_ref& operator=( const atomic_ref& ) = delete; (2) (since C++20)
- Atomically assigns a value
desiredto the referenced object. Equivalent tostore(desired)π₯ atomic_refis notCopyAssignableπ
π Parameters π
desiredβ value to assign π«Ά
π Return value π
desired β yep, it just gives desired right back to you, no cap π
π§ Notes π§
Unlike most assignment operators, the assignment operator for atomic_ref does not return a reference to its left-hand argument π±
It returns a copy of the stored value instead. That's the plot twist, bestie β iconic behavior, honestly πβ¨
π See also π
- constructor β constructs an
atomic_refobject (public member function) π¦
xoxo, source/version: http://cppreference.com β 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