1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <mutex>
11 
12 // struct defer_lock_t {};
13 // struct try_to_lock_t {};
14 // struct adopt_lock_t {};
15 //
16 // constexpr defer_lock_t  defer_lock{};
17 // constexpr try_to_lock_t try_to_lock{};
18 // constexpr adopt_lock_t  adopt_lock{};
19 
20 #include <mutex>
21 #include <type_traits>
22 
23 int main()
24 {
25     typedef std::defer_lock_t T1;
26     typedef std::try_to_lock_t T2;
27     typedef std::adopt_lock_t T3;
28 
29     T1 t1 = std::defer_lock;
30     T2 t2 = std::try_to_lock;
31     T3 t3 = std::adopt_lock;
32 }
33