]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / thread / test / sync / mutual_exclusion / locks / reverse_lock / copy_ctor_fail.cpp
1 // Copyright (C) 2012 Vicente J. Botet Escriba
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 // <boost/thread/locks.hpp>
7
8 // template <class Mutex> class reverse_lock;
9
10 // reverse_lock(reverse_lock const&) = delete;
11
12
13 #include <boost/thread/lock_types.hpp>
14 #include <boost/thread/reverse_lock.hpp>
15 #include <boost/thread/mutex.hpp>
16 #include <boost/thread/lock_types.hpp>
17
18 boost::mutex m0;
19 boost::mutex m1;
20
21 int main()
22 {
23 boost::mutex m0;
24 boost::unique_lock<boost::mutex> lk0(m0);
25 {
26 boost::reverse_lock<boost::unique_lock<boost::mutex> > lg0(lk0);
27 boost::reverse_lock<boost::unique_lock<boost::mutex> > lg1(lg0);
28 }
29 }
30
31 #include "../../../../remove_error_code_unused_warning.hpp"
32