std::once_flag Struct Reference
Concurrency » Mutexes

`#include <mutex>`

## Public Member Functions

| once_flag (const once_flag &)=delete
once_flag & | operator= (const once_flag &)=delete

## Friends

template<typename _Callable, typename... _Args>
void | call_once (once_flag &__once, _Callable &&__f, _Args &&... __args)

## Detailed Description

Flag type used by std::call_once.

Definition at line 795 of file mutex.

## Constructor & Destructor Documentation

## once_flag()

std::once_flag::once_flag | ( | const once_flag & |  | ) |

delete

Deleted copy constructor.

## Member Function Documentation

## operator=()

once_flag & std::once_flag::operator= | ( | const once_flag & |  | ) |

delete

Deleted assignment operator.

## Friends And Related Symbol Documentation

## call_once

template<typename _Callable, typename... _Args>

void call_once | ( | once_flag & | __once,
|  | _Callable && | __f,
|  | _Args &&... | __args )

friend

Invoke a callable and synchronize with other calls using the same flag.

Definition at line 912 of file mutex.

References std::__invoke(), and std::forward().

The documentation for this struct was generated from the following file:

- mutex