Debian Codegraph @

libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/default.pass.cpp

raw
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // UNSUPPORTED: no-threads
10
11 // <mutex>
12
13 // template <class Mutex> class unique_lock;
14
15 // unique_lock();
16
17 #include <mutex>
18 #include <cassert>
19
20 #include "test_macros.h"
21
22 int main(int, char**)
23 {
24 std::unique_lock<std::mutex> ul;
25 assert(!ul.owns_lock());
26 assert(ul.mutex() == nullptr);
27
28 return 0;
29 }