]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/conditional_test.cpp
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)
8 # include <type_traits>
10 # include <boost/type_traits/conditional.hpp>
12 #include <boost/type_traits/is_same.hpp>
14 #include "check_integral_constant.hpp"
16 TT_TEST_BEGIN(conditional
)
18 BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same
< ::tt::conditional
<true, int, long>::type
, int>::value
), true);
19 BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same
< ::tt::conditional
<false, int, long>::type
, long>::value
), true);
20 BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same
< ::tt::conditional
<true, int, long>::type
, long>::value
), false);
21 BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_same
< ::tt::conditional
<false, int, long>::type
, int>::value
), false);