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(scoped_lock const&) = delete;
19 #include "test_macros.h"
26 using LG
= std::scoped_lock
<>;
28 LG
Copy(Orig
); // expected-error{{call to deleted constructor of 'LG'}}
31 using LG
= std::scoped_lock
<M
>;
33 LG
Copy(Orig
); // expected-error{{call to deleted constructor of 'LG'}}
36 using LG
= std::scoped_lock
<M
, M
>;
37 const LG
Orig(m0
, m1
);
38 LG
Copy(Orig
); // expected-error{{call to deleted constructor of 'LG'}}
41 using LG
= std::scoped_lock
<M
, M
, M
>;
42 const LG
Orig(m0
, m1
, m2
);
43 LG
Copy(Orig
); // expected-error{{call to deleted constructor of 'LG'}}