]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/copy_cv_test.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / type_traits / test / copy_cv_test.cpp
1
2 // Copyright Peter Dimov 2015
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt)
6
7 #ifdef TEST_STD
8 # include <type_traits>
9 #else
10 # include <boost/type_traits/copy_cv.hpp>
11 #endif
12 #include "test.hpp"
13 #include "check_type.hpp"
14 #include <iostream>
15
16 TT_TEST_BEGIN(copy_cv)
17 {
18 BOOST_CHECK_TYPE3(tt::copy_cv<int, void>::type, int);
19 BOOST_CHECK_TYPE3(tt::copy_cv<int const, void>::type, int const);
20 BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void>::type, int volatile);
21 BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void>::type, int const volatile);
22
23 BOOST_CHECK_TYPE3(tt::copy_cv<int, void const>::type, int const);
24 BOOST_CHECK_TYPE3(tt::copy_cv<int const, void const>::type, int const);
25 BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void const>::type, int const volatile);
26 BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void const>::type, int const volatile);
27
28 BOOST_CHECK_TYPE3(tt::copy_cv<int, void volatile>::type, int volatile);
29 BOOST_CHECK_TYPE3(tt::copy_cv<int const, void volatile>::type, int const volatile);
30 BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void volatile>::type, int volatile);
31 BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void volatile>::type, int const volatile);
32
33 BOOST_CHECK_TYPE3(tt::copy_cv<int, void const volatile>::type, int const volatile);
34 BOOST_CHECK_TYPE3(tt::copy_cv<int const, void const volatile>::type, int const volatile);
35 BOOST_CHECK_TYPE3(tt::copy_cv<int volatile, void const volatile>::type, int const volatile);
36 BOOST_CHECK_TYPE3(tt::copy_cv<int const volatile, void const volatile>::type, int const volatile);
37
38 BOOST_CHECK_TYPE3(tt::copy_cv<int&, void const volatile>::type, int&);
39
40 BOOST_CHECK_TYPE3(tt::copy_cv<int const*, void volatile>::type, int const* volatile);
41
42 BOOST_CHECK_TYPE3(tt::copy_cv<long, int const volatile&>::type, long);
43 }
44 TT_TEST_END