]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/make_void_test.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / type_traits / test / make_void_test.cpp
1 /*
2 Copyright 2017 Glen Joseph Fernandes
3 <glenjofe -at- gmail.com>
4
5 Distributed under the Boost Software License,
6 Version 1.0. (See accompanying file LICENSE_1_0.txt
7 or copy at http://www.boost.org/LICENSE_1_0.txt)
8 */
9
10 #include "test.hpp"
11 #include "check_type.hpp"
12
13 #ifdef TEST_STD
14 #include <type_traits>
15 #else
16 #include <boost/type_traits/make_void.hpp>
17 #endif
18
19 TT_TEST_BEGIN(make_void)
20
21 BOOST_CHECK_TYPE(::tt::make_void<int>::type, void);
22 BOOST_CHECK_TYPE(::tt::make_void<const volatile int>::type, void);
23 BOOST_CHECK_TYPE(::tt::make_void<int&>::type, void);
24 BOOST_CHECK_TYPE(::tt::make_void<void>::type, void);
25 BOOST_CHECK_TYPE(::tt::make_void<int(*)(int)>::type, void);
26 BOOST_CHECK_TYPE(::tt::make_void<int[]>::type, void);
27 BOOST_CHECK_TYPE(::tt::make_void<int[1]>::type, void);
28
29 BOOST_CHECK_TYPE(::tt::make_void<>::type, void);
30 BOOST_CHECK_TYPE3(::tt::make_void<int, int>::type, void);
31
32 #ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
33 BOOST_CHECK_TYPE(::tt::void_t<int>, void);
34 BOOST_CHECK_TYPE(::tt::void_t<const volatile int>, void);
35 BOOST_CHECK_TYPE(::tt::void_t<int&>, void);
36 BOOST_CHECK_TYPE(::tt::void_t<void>, void);
37 BOOST_CHECK_TYPE(::tt::void_t<int(*)(int)>, void);
38 BOOST_CHECK_TYPE(::tt::void_t<int[]>, void);
39 BOOST_CHECK_TYPE(::tt::void_t<int[1]>, void);
40
41 BOOST_CHECK_TYPE(::tt::void_t<>, void);
42 BOOST_CHECK_TYPE3(::tt::void_t<int, int>, void);
43 #endif
44
45 TT_TEST_END