]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/thread/test/sync/mutual_exclusion/locks/nested_strict_lock/types_pass.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / thread / test / sync / mutual_exclusion / locks / nested_strict_lock / types_pass.cpp
CommitLineData
7c673cae
FG
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/mutex.hpp>
7
8// <mutex>
9
10// template <class Lock>
11// class nested_strict_lock
12// {
13// public:
14// typedef typename Lock::mutex_type mutex_type;
15// ...
16// };
17
18
19#include <boost/thread/lock_types.hpp>
20#include <boost/thread/strict_lock.hpp>
21#include <boost/thread/mutex.hpp>
22#include <boost/static_assert.hpp>
23#include <boost/type_traits/is_same.hpp>
24#include <boost/detail/lightweight_test.hpp>
25
26int main()
27{
28 BOOST_STATIC_ASSERT_MSG((boost::is_same<boost::nested_strict_lock<boost::unique_lock<boost::mutex> >::mutex_type,
29 boost::mutex>::value), "");
30
31 BOOST_STATIC_ASSERT_MSG((boost::is_strict_lock<boost::nested_strict_lock<boost::unique_lock<boost::mutex> > >::value), "");
32
33 return boost::report_errors();
34}
35