std::scoped_lock< _MutexTypes > Class Template Reference
Concurrency » Mutexes

`#include <mutex>`

## Public Member Functions

| scoped_lock (_MutexTypes &... __m)
| scoped_lock (adopt_lock_t, _MutexTypes &... __m) noexcept
| scoped_lock (const scoped_lock &)=delete
scoped_lock & | operator= (const scoped_lock &)=delete

## Detailed Description

template<typename... _MutexTypes>
class std::scoped_lock< _MutexTypes >

A scoped lock type for multiple lockable objects.

A scoped_lock controls mutex ownership within a scope, releasing ownership in the destructor.

Since
  C++17

Definition at line 740 of file mutex.

## Constructor & Destructor Documentation

## scoped_lock() [1/2]

template<typename... _MutexTypes>

std::scoped_lock< _MutexTypes >::scoped_lock | ( | _MutexTypes &... | __m | ) |

inline explicit

Definition at line 743 of file mutex.

## scoped_lock() [2/2]

template<typename... _MutexTypes>

std::scoped_lock< _MutexTypes >::scoped_lock | ( | adopt_lock_t | ,
|  | _MutexTypes &... | __m
| ) |  |

inline explicit noexcept

Definition at line 746 of file mutex.

## ~scoped_lock()

template<typename... _MutexTypes>

std::scoped_lock< _MutexTypes >::~scoped_lock | ( |  | ) |

inline

Definition at line 750 of file mutex.

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

- mutex