14684ddb6SLionel Sambuc //===----------------------------------------------------------------------===//
24684ddb6SLionel Sambuc //
34684ddb6SLionel Sambuc //                     The LLVM Compiler Infrastructure
44684ddb6SLionel Sambuc //
54684ddb6SLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open
64684ddb6SLionel Sambuc // Source Licenses. See LICENSE.TXT for details.
74684ddb6SLionel Sambuc //
84684ddb6SLionel Sambuc //===----------------------------------------------------------------------===//
94684ddb6SLionel Sambuc 
104684ddb6SLionel Sambuc // <shared_mutex>
114684ddb6SLionel Sambuc 
124684ddb6SLionel Sambuc // template <class Mutex> class shared_lock;
134684ddb6SLionel Sambuc 
144684ddb6SLionel Sambuc // shared_lock(mutex_type& m, defer_lock_t);
154684ddb6SLionel Sambuc 
164684ddb6SLionel Sambuc #include <shared_mutex>
174684ddb6SLionel Sambuc #include <cassert>
184684ddb6SLionel Sambuc 
main()194684ddb6SLionel Sambuc int main()
204684ddb6SLionel Sambuc {
214684ddb6SLionel Sambuc #if _LIBCPP_STD_VER > 11
22*0a6a1f1dSLionel Sambuc     std::shared_timed_mutex m;
23*0a6a1f1dSLionel Sambuc     std::shared_lock<std::shared_timed_mutex> lk(m, std::defer_lock);
244684ddb6SLionel Sambuc     assert(lk.mutex() == &m);
254684ddb6SLionel Sambuc     assert(lk.owns_lock() == false);
264684ddb6SLionel Sambuc #endif  // _LIBCPP_STD_VER > 11
274684ddb6SLionel Sambuc }
28