summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp')
-rw-r--r--libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
index f9a537085c3..ac338064d1f 100644
--- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
+++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
@@ -18,6 +18,9 @@
// explicit shared_lock(mutex_type& m);
+// template<class _Mutex> shared_lock(shared_lock<_Mutex>)
+// -> shared_lock<_Mutex>; // C++17
+
#include <shared_mutex>
#include <thread>
#include <vector>
@@ -92,4 +95,9 @@ int main()
t.join();
q.join();
}
+
+#ifdef __cpp_deduction_guides
+ std::shared_lock sl(m);
+ static_assert((std::is_same<decltype(sl), std::shared_lock<decltype(m)>>::value), "" );
+#endif
}
OpenPOWER on IntegriCloud