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