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 // explicit scoped_lock(Mutex&...);
19 #include "test_macros.h"
22 void test_conversion(LG
) {}
30 using LG
= std::scoped_lock
<>;
31 LG lg
= {}; // expected-error{{chosen constructor is explicit in copy-initialization}}
32 test_conversion
<LG
>({}); // expected-error{{no matching function for call}}
36 using LG
= std::scoped_lock
<M
>;
37 LG lg
= {m0
}; // expected-error{{chosen constructor is explicit in copy-initialization}}
38 test_conversion
<LG
>({n0
}); // expected-error{{no matching function for call}}
42 using LG
= std::scoped_lock
<M
, M
>;
43 LG lg
= {m0
, m1
}; // expected-error{{chosen constructor is explicit in copy-initialization}}
44 test_conversion
<LG
>({n0
, n1
}); // expected-error{{no matching function for call}}
48 using LG
= std::scoped_lock
<M
, M
, M
>;
49 LG lg
= {m0
, m1
, m2
}; // expected-error{{chosen constructor is explicit in copy-initialization}}
50 test_conversion
<LG
>({n0
, n1
, n2
}); // expected-error{{no matching function for call}}