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: libcpp-has-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 int main(int, char**) 21 { 22 std::unique_lock<std::mutex> ul; 23 assert(!ul.owns_lock()); 24 assert(ul.mutex() == nullptr); 25 26 return 0; 27 } 28