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 // UNSUPPORTED: c++98, c++03, c++11 11 // <shared_mutex> 12 13 // template <class Mutex> class shared_lock; 14 15 // shared_lock& operator=(shared_lock const&) = delete; 16 17 #include <shared_mutex> 18 19 std::shared_timed_mutex m0; 20 std::shared_timed_mutex m1; 21 main()22int main() 23 { 24 std::shared_lock<std::shared_timed_mutex> lk0(m0); 25 std::shared_lock<std::shared_timed_mutex> lk1(m1); 26 lk1 = lk0; 27 } 28