Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / thread / thread.mutex / thread.lock / thread.lock.shared / implicit_ctad.pass.cpp
blob23a946b331be9d3870dd12df924d1a8eadc31965
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++98, c++03, c++11, c++14
12 // XFAIL: availability-shared_mutex-missing
14 // <shared_mutex>
16 // shared_lock
18 // Make sure that the implicitly-generated CTAD works.
20 #include <shared_mutex>
22 #include "test_macros.h"
24 int main(int, char**) {
25 std::shared_mutex mutex;
27 std::shared_lock lock(mutex);
28 ASSERT_SAME_TYPE(decltype(lock), std::shared_lock<std::shared_mutex>);
31 return 0;