std::scoped_lock<MutexTypes...>::scoped_lock (3) - Linux Manuals
std::scoped_lock<MutexTypes...>::scoped_lock: std::scoped_lock<MutexTypes...>::scoped_lock
Command to display std::scoped_lock<MutexTypes...>::scoped_lock
manual in Linux: $ man 3 std::scoped_lock<MutexTypes...>::scoped_lock
NAME
std::scoped_lock<MutexTypes...>::scoped_lock - std::scoped_lock<MutexTypes...>::scoped_lock
Synopsis
explicit scoped_lock( MutexTypes&... m ); (1) (since C++17)
scoped_lock( std::adopt_lock_t, MutexTypes&... m ); (2) (since C++17)
scoped_lock( const scoped_lock& ) = delete; (3) (since C++17)
Acquires ownership of the given mutexes m.
1) If sizeof...(MutexTypes) == 0, does nothing. Otherwise, If sizeof...(MutexTypes) == 1, effectively calls m.lock(). Otherwise, effectively calls std::lock(m...). The behavior is undefined if one of MutexTypes is not a recursive mutex and the current thread already owns the corresponding argument in m....
2) Acquires ownership of the mutexes m... without attempting to lock any of them. The behavior is undefined unless the current thread owns all of the mutexes in m....
3) Copy constructor is deleted.
The behavior is undefined if m is destroyed before the scoped_lock object is.
Parameters
m - mutexes to acquire ownership of
Exceptions
1) Throws any exceptions thrown by m.lock()
2) Throws nothing
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior
P0739R0 C++17 adopt_lock_t parameter was last, impeding class template argument deduction moved to first
Pages related to std::scoped_lock<MutexTypes...>::scoped_lock
- std::scoped_lock<MutexTypes...>::~scoped_lock (3) - std::scoped_lock<MutexTypes...>::~scoped_lock
- std::scoped_lock (3) - std::scoped_lock
- std::scoped_allocator_adaptor (3) - std::scoped_allocator_adaptor
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::allocate (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::allocate
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::construct (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::construct
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::deallocate (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::deallocate
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::destroy (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::destroy
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::inner_allocator (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::inner_allocator
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::max_size (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::max_size
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::operator= (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::operator=
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::outer_allocator (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::outer_allocator
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::scoped_allocator_adaptor (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::scoped_allocator_adaptor
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::select_on_container_copy_construction (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::select_on_container_copy_construction
- std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::~scoped_allocator_adaptor (3) - std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::~scoped_allocator_adaptor
- std::scalbn,std::scalbnf,std::scalbnl,std::scalbln,std::scalblnf,std::scalblnl (3) - std::scalbn,std::scalbnf,std::scalbnl,std::scalbln,std::scalblnf,std::scalblnl