]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/parameter/test/unwrap_cv_reference.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / parameter / test / unwrap_cv_reference.cpp
1 // Copyright David Abrahams 2005. Distributed under the Boost
2 // Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4
5 #include <boost/parameter/aux_/unwrap_cv_reference.hpp>
6 #include <boost/mpl/assert.hpp>
7 #include <boost/ref.hpp>
8 #include <boost/type_traits/is_same.hpp>
9
10 namespace test
11 {
12 using namespace boost::parameter::aux;
13 using namespace boost;
14 struct foo {};
15
16 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<int>::type,int>));
17 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<int const>::type,int const>));
18 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<int volatile>::type,int volatile>));
19 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<int const volatile>::type,int const volatile>));
20
21 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<foo>::type,foo>));
22 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<foo const>::type,foo const>));
23 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<foo volatile>::type,foo volatile>));
24 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<foo const volatile>::type,foo const volatile>));
25
26 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<reference_wrapper<foo> >::type,foo>));
27 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<reference_wrapper<foo> const>::type,foo>));
28 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<reference_wrapper<foo> volatile>::type,foo>));
29 BOOST_MPL_ASSERT((is_same<unwrap_cv_reference<reference_wrapper<foo> const volatile>::type,foo>));
30 }