---
name: "std::atomic_flag"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::atomic_flag/3cxx"
---

# std::atomic\_flag(3cxx)

atomic\_flag

## NAME

std::atomic\_flag - atomic\_flag

## SYNOPSIS

`#include <atomic>`

Inherits \_\_atomic\_flag\_base.

### Public Member Functions

constexpr **atomic\_flag** (bool \_\_i) noexcept\
 **atomic\_flag** (const **atomic\_flag** &)=**delete**\
 **void** **clear** (**memory\_order** **\_\_m**=memory\_order\_seq\_cst) noexcept\
 **void** **clear** (**memory\_order** **\_\_m**=memory\_order\_seq\_cst) **volatile** noexcept\
 **void** **notify\_all** () noexcept\
 **void** **notify\_one** () noexcept\
 **atomic\_flag** & **operator=** (const **atomic\_flag** &) **volatile**=**delete**\
 **atomic\_flag** & **operator=** (const **atomic\_flag** &)=**delete**\
 bool **test** (**memory\_order** **\_\_m**=memory\_order\_seq\_cst) const noexcept\
 bool **test** (**memory\_order** **\_\_m**=memory\_order\_seq\_cst) const **volatile** noexcept\
 bool **test\_and\_set** (**memory\_order** **\_\_m**=memory\_order\_seq\_cst) noexcept\
 bool **test\_and\_set** (**memory\_order** **\_\_m**=memory\_order\_seq\_cst) **volatile** noexcept\
 **void** **wait** (bool **\_\_old**, **memory\_order** **\_\_m**=memory\_order\_seq\_cst) const noexcept\

## Detailed Description

atomic\_flag

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
