|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
atomic_flag::atomic_flag | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) | ||||
(C++20) |
Defined in header <atomic> | ||
| (1) | ||
atomic_flag()noexcept=default; | (since C++11) (until C++20) | |
constexpr atomic_flag()noexcept; | (since C++20) | |
atomic_flag(const atomic_flag&)= delete; | (2) | (since C++11) |
Constructs a newstd::atomic_flag.
1) Trivial default constructor, initializesstd::atomic_flag to unspecified state. | (until C++20) |
1) Initializesstd::atomic_flag to clear state. | (since C++20) |
In addition,std::atomic_flag can be value-initialized to clear state with the expressionATOMIC_FLAG_INIT. For anatomic_flag with staticstorage duration, this guaranteesstatic initialization: the flag can be used in constructors of static objects.
(C++11) | initializes anstd::atomic_flag tofalse (macro constant)[edit] |