1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: libcpp-has-no-threads
11 // UNSUPPORTED: c++98, c++03, c++11, c++14
15 // template <class ...Mutex> class scoped_lock;
17 // scoped_lock(scoped_lock const&) = delete;
20 #include "test_macros.h"
27 using LG = std::scoped_lock<>;
29 LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}
32 using LG = std::scoped_lock<M>;
34 LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}
37 using LG = std::scoped_lock<M, M>;
38 const LG Orig(m0, m1);
39 LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}
42 using LG = std::scoped_lock<M, M, M>;
43 const LG Orig(m0, m1, m2);
44 LG Copy(Orig); // expected-error{{call to deleted constructor of 'LG'}}