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
13 // template <class Mutex> class unique_lock;
15 // mutex_type *mutex() const;
20 #include "test_macros.h"
26 std::unique_lock
<std::mutex
> lk0
;
27 assert(lk0
.mutex() == nullptr);
28 std::unique_lock
<std::mutex
> lk1(m
);
29 assert(lk1
.mutex() == &m
);
31 assert(lk1
.mutex() == &m
);