Documentation Home >> Headers >> <atomic> Header >> std::atomic_flag >> std::atomic_flag::clear member function

Atomically clear the flag.

void clear(memory_order order = memory_order_seq_cst)
    volatile;

Preconditions:

The supplied order must be one of std::memory_order_relaxed, std::memory_order_release or std::memory_order_seq_cst

Effects:

Atomically clears the flag.

Throws:

Nothing.

Note:

This is an atomic store operation for the memory location comprising *this.

Header

#include <atomic>

See Also