Home | History | Annotate | Download | only in thread.lock.shared.cons
      1 //===----------------------------------------------------------------------===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is dual licensed under the MIT and the University of Illinois Open
      6 // Source Licenses. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 
     10 // <shared_mutex>
     11 
     12 // template <class Mutex> class shared_lock;
     13 
     14 // shared_lock(shared_lock const&) = delete;
     15 
     16 #include <shared_mutex>
     17 
     18 #if _LIBCPP_STD_VER > 11
     19 std::shared_timed_mutex m;
     20 #endif  // _LIBCPP_STD_VER > 11
     21 
     22 int main()
     23 {
     24 #if _LIBCPP_STD_VER > 11
     25     std::shared_lock<std::shared_timed_mutex> lk0(m);
     26     std::shared_lock<std::shared_timed_mutex> lk = lk0;
     27 #else
     28 #   error
     29 #endif  // _LIBCPP_STD_VER > 11
     30 }
     31