1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-threads
10 // UNSUPPORTED: c++03, c++11, c++14
14 // template <class ...Mutex> class scoped_lock;
16 // scoped_lock& operator=(scoped_lock const&) = delete;
19 #include "test_macros.h"
27 using LG
= std::scoped_lock
<>;
29 lg1
= lg2
; // expected-error{{overload resolution selected deleted operator '='}}
32 using LG
= std::scoped_lock
<M
>;
35 lg1
= lg2
; // expected-error{{overload resolution selected deleted operator '='}}
38 using LG
= std::scoped_lock
<M
, M
>;
41 lg1
= lg2
; // expected-error{{overload resolution selected deleted operator '='}}
44 using LG
= std::scoped_lock
<M
, M
, M
>;
46 LG
lg2(om0
, om1
, om2
);
47 lg1
= lg2
; // expected-error{{overload resolution selected deleted operator '='}}