cpp/thread/once flag

The class is a helper structure for std.

An object of type that is passed to multiple calls to std allows those calls to coordinate with each other such that only one of the calls will actually run to completion.

is neither copyable nor movable.

Member functions
{{member | {{small|std::once_flag::}}once_flag | {{ddcl | constexpr once_flag noexcept; }}

Constructs an {{tt|once_flag}} object. The internal state is set to indicate that no function has been called yet.

Parameters
(none)

}}