]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/is_complete_test.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / type_traits / test / is_complete_test.cpp
1
2 // (C) Copyright John Maddock 2000.
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.boost.org/LICENSE_1_0.txt)
6
7 #ifdef TEST_STD
8 # include <type_traits>
9 #else
10 # include <boost/type_traits/is_complete.hpp>
11 #endif
12 #include "test.hpp"
13 #include "check_integral_constant.hpp"
14
15 TT_TEST_BEGIN(is_complete)
16
17 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int>::value, true);
18 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const>::value, true);
19 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile>::value, true);
20 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile>::value, true);
21 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int>::value, true);
22 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const&>::value, true);
23 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile&>::value, true);
24 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile&>::value, true);
25 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int*>::value, true);
26 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const*>::value, true);
27 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile*>::value, true);
28 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile*>::value, true);
29
30 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int[2]>::value, true);
31 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const[3]>::value, true);
32 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int volatile[2][3]>::value, true);
33 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int const volatile[4][5][6]>::value, true);
34 #ifdef BOOST_TT_HAS_WORKING_IS_COMPLETE
35 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<int[]>::value, false);
36 #endif
37
38 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<enum_UDT>::value, true);
39 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<UDT>::value, true);
40 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<f1>::value, true);
41 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<mf1>::value, true);
42 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<cmf>::value, true);
43 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<mf8>::value, true);
44 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<union_UDT>::value, true);
45 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<test_abc1>::value, true);
46 #ifdef BOOST_TT_HAS_WORKING_IS_COMPLETE
47 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<incomplete_type>::value, false);
48 #endif
49 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<polymorphic_base>::value, true);
50 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<virtual_inherit6>::value, true);
51 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<foo0_t>::value, true);
52 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_complete<foo4_t>::value, true);
53
54 TT_TEST_END
55