Documentation Home >> Headers >> <atomic> Header >> std::atomic_flag >> std::atomic_flag Construction

Instances of std::atomic_flag must be initialized using the ATOMIC_FLAG_INIT macro.

std::atomic_flag flag=ATOMIC_FLAG_INIT;

Effects:

Constructs a new std::atomic_flag object in the clear state.

Throws:

Nothing.

Header

#include <atomic>

See Also