]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/test/conditional_test.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / type_traits / test / conditional_test.cpp
CommitLineData
7c673cae
FG
1
2// (C) Copyright John Maddock 2010.
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
7c673cae
FG
7#ifdef TEST_STD
8# include <type_traits>
9#else
10# include <boost/type_traits/conditional.hpp>
11#endif
12#include <boost/type_traits/is_same.hpp>
11fdf7f2
TL
13#include "test.hpp"
14#include "check_integral_constant.hpp"
7c673cae
FG
15
16TT_TEST_BEGIN(conditional)
17
18BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<true, int, long>::type, int>::value), true);
19BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<false, int, long>::type, long>::value), true);
20BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<true, int, long>::type, long>::value), false);
21BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same< ::tt::conditional<false, int, long>::type, int>::value), false);
22
23TT_TEST_END
24
25
26
27
28
29
30
31