std::atomic_flag(3cxx)
okay so bestie, welcome to the std::atomic_flag(3cxx) page from libstdc++ π
this is the manual page for std::atomic_flag, and we are keeping every single receipt. no cap.
π NAME π
std::atomic_flag - atomic_flag
β¨ SYNOPSIS β¨
#include <atomic>
Inherits __atomic_flag_base.
π Public Member Functions π
constexpr atomic_flag (bool __i) noexceptβ the constructor, and yes it takes abool __iand isconstexpr+noexceptπ«Άatomic_flag (const atomic_flag &)=deleteβ copy constructor is=delete, so do not try to copy this icon πvoid clear (memory_order __m=memory_order_seq_cst) noexceptβ the non-volatileclear, with__mdefaulting tomemory_order_seq_cstβ¨void clear (memory_order __m=memory_order_seq_cst) volatile noexceptβ thevolatileclearoverload, same defaultmemory_order_seq_cstenergy πΈvoid notify_all () noexceptβnotify_all,noexcept, periodt πvoid notify_one () noexceptβnotify_one, alsonoexcept, we love consistency πatomic_flag & operator= (const atomic_flag &) volatile=deleteβ deletedvolatileassignment operator, not me forgetting this one πatomic_flag & operator= (const atomic_flag &)=deleteβ deleted assignment operator, no copying or assigning, bestie π«bool test (memory_order __m=memory_order_seq_cst) const noexceptβ theconsttest,__mdefaults tomemory_order_seq_cst, and it isnoexceptπ₯bool test (memory_order __m=memory_order_seq_cst) const volatile noexceptβ theconst volatiletestoverload, same default__m, stillnoexceptπbool test_and_set (memory_order __m=memory_order_seq_cst) noexceptβ the plaintest_and_set, with__mdefaulting tomemory_order_seq_cstβbool test_and_set (memory_order __m=memory_order_seq_cst) volatile noexceptβ thevolatiletest_and_setoverload, same default__m, samenoexceptvibe πvoid wait (bool __old, memory_order __m=memory_order_seq_cst) const noexceptβwaittakesbool __old,__mdefaults tomemory_order_seq_cst, and it isconst noexceptπ¦
π¨ quick vibe check: bothoperator=overloads and the copy constructor are=delete. that is literally in the signatures, so no sneaky copying/assigning.
π Detailed Description π
atomic_flag
thatβs it. thatβs the detailed description. iconic minimalism, honestly π
π Author π
Author: Generated automatically by Doxygen for libstdc++ from the source code.
xoxo, your libstdc++ bestie π source/version: libstdc++; page: std::atomic_flag(3cxx). the footer does not print a date, so iβm not inventing one β periodt π
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms