[SandboxVec][Utils] Implement Utils::verifyFunction() (#124356)
[llvm-project.git] / libcxx / test / std / thread / thread.mutex / thread.lock / thread.lock.shared / implicit_ctad.pass.cpp
blob826ec2b558f07558c8314216715d67356cd90160
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 // UNSUPPORTED: no-threads
10 // UNSUPPORTED: c++03, c++11, c++14
12 // <shared_mutex>
14 // shared_lock
16 // Make sure that the implicitly-generated CTAD works.
18 #include <shared_mutex>
20 #include "test_macros.h"
22 int main(int, char**) {
23 std::shared_mutex mutex;
25 std::shared_lock lock(mutex);
26 ASSERT_SAME_TYPE(decltype(lock), std::shared_lock<std::shared_mutex>);
29 return 0;