]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/test/conjunction_test.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / type_traits / test / conjunction_test.cpp
CommitLineData
20effc67
TL
1/*
2Copyright 2020 Glen Joseph Fernandes
3(glenjofe@gmail.com)
4
5Distributed under the Boost Software License,
6Version 1.0. (See accompanying file LICENSE_1_0.txt
7or copy at http://www.boost.org/LICENSE_1_0.txt)
8*/
9#ifdef TEST_STD
10#include <type_traits>
11#else
12#include <boost/type_traits/conjunction.hpp>
13#endif
14#include "check_integral_constant.hpp"
15
16template<int V>
17struct Int {
18 static const int value = V;
19};
20
21TT_TEST_BEGIN(conjunction)
22
23BOOST_CHECK_INTEGRAL_CONSTANT((::tt::conjunction<Int<2>, Int<4> >::value), 4);
24BOOST_CHECK_INTEGRAL_CONSTANT((::tt::conjunction<Int<0>, Int<4> >::value), 0);
25
26#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
27BOOST_CHECK_INTEGRAL_CONSTANT((::tt::conjunction<Int<2>, Int<4>, Int<6>,
28 Int<8>, Int<10> >::value), 10);
29BOOST_CHECK_INTEGRAL_CONSTANT((::tt::conjunction<Int<2>, Int<0>, Int<4>,
30 Int<6>, Int<8> >::value), 0);
31BOOST_CHECK_INTEGRAL_CONSTANT(::tt::conjunction<Int<4> >::value, 4);
32BOOST_CHECK_INTEGRAL_CONSTANT(::tt::conjunction<>::value, true);
33#endif
34
35TT_TEST_END