---
name: "std::scoped_lock"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::scoped_lock"
---

# std::scoped\_lock(3cxx)

A scoped lock type for multiple lockable objects.

## NAME

std::scoped\_lock\< \_MutexTypes \> - A scoped lock type for multiple lockable objects.

## SYNOPSIS

`#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

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
