std::atomic_flag_clear, std::atomic_flag_clear_explicit

Header: <atomic>

Atomically changes the state of the std::atomic_flag pointed to by obj to clear (false).

# Declarations

void atomic_flag_clear( volatile std::atomic_flag* obj ) noexcept;

(since C++11)

void atomic_flag_clear( std::atomic_flag* obj ) noexcept;

(since C++11)

void atomic_flag_clear_explicit( volatile std::atomic_flag* obj,
std::memory_order order ) noexcept;

(since C++11)

void atomic_flag_clear_explicit( std::atomic_flag* obj,
std::memory_order order ) noexcept;

(since C++11)

# Parameters

# Notes

std::atomic_flag_clear and std::atomic_flag_clear_explicit can be implemented as obj->clear() and obj->clear(order) respectively.

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 2138C++11order could be std::memory_order_consumethe behavior is undefined in this case

# See also