[lldb] Make SBProgress move-only (#124843)
[llvm-project.git] / libcxx / test / std / thread / thread.mutex / thread.lock / thread.lock.unique / thread.lock.unique.cons / default.pass.cpp
blobf6ca534de42fe942a2b56bcdbda31a34a28704ed
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 //===----------------------------------------------------------------------===//
9 // <mutex>
11 // template <class Mutex> class unique_lock;
13 // unique_lock();
15 #include <cassert>
16 #include <mutex>
17 #include <type_traits>
19 #include "checking_mutex.h"
20 #include "test_macros.h"
22 #if TEST_STD_VER >= 11
23 static_assert(std::is_nothrow_default_constructible<std::unique_lock<checking_mutex>>::value, "");
24 #endif
26 int main(int, char**) {
27 std::unique_lock<checking_mutex> ul;
28 assert(!ul.owns_lock());
29 assert(ul.mutex() == nullptr);
31 return 0;