forked from boostorg/type_traits
Update to use new BOOST_HAS_FLOAT128, plus more tests.
This commit is contained in:
@ -21,9 +21,9 @@ namespace boost {
|
||||
template<> struct is_floating_point<double> : public true_type{};
|
||||
template<> struct is_floating_point<long double> : public true_type{};
|
||||
|
||||
#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__)
|
||||
#if defined(BOOST_HAS_FLOAT128)
|
||||
template<> struct is_floating_point<__float128> : public true_type{};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
|
@ -151,6 +151,15 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char16_t>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<char32_t>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_INT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<boost::int128_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<boost::uint128_type>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_FLOAT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_arithmetic<boost::float128_type>::value, true);
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
@ -29,6 +29,13 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<long double const>::value,
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<long double volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<long double const volatile>::value, true);
|
||||
|
||||
#ifdef BOOST_HAS_FLOAT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<__float128>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<const __float128>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<volatile __float128>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_floating_point<const volatile __float128>::value, true);
|
||||
#endif
|
||||
|
||||
//
|
||||
// cases that should not be true:
|
||||
//
|
||||
|
@ -155,6 +155,15 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char16_t>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<char32_t>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_INT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<boost::int128_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<boost::uint128_type>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_FLOAT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_fundamental<boost::float128_type>::value, true);
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
@ -177,6 +177,15 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char16_t>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<char32_t>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_INT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<boost::int128_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<boost::uint128_type>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_FLOAT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_pod<boost::float128_type>::value, true);
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
@ -156,6 +156,16 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char16_t>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<char32_t>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_INT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<boost::int128_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<boost::uint128_type>::value, true);
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_FLOAT128
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scalar<boost::float128_type>::value, true);
|
||||
#endif
|
||||
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user