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 // <mutex> 11 12 // template <class Mutex> class lock_guard; 13 14 // lock_guard& operator=(lock_guard const&) = delete; 15 16 #include <mutex> 17 main()18int main() 19 { 20 std::mutex m0; 21 std::mutex m1; 22 std::lock_guard<std::mutex> lg0(m0); 23 std::lock_guard<std::mutex> lg(m1); 24 lg = lg0; 25 } 26