Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/parameter/test/unwrap_cv_reference.cpp @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

  • Property svn:executable set to *
File size: 1.4 KB
Line 
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
10namespace 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}
Note: See TracBrowser for help on using the repository browser.