]>
git.proxmox.com Git - ceph.git/blob - 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)
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>
12 using namespace boost::parameter::aux
;
13 using namespace boost
;
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>));
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>));
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
>));