forked from boostorg/type_traits
Merge pull request #176 from boostorg/pr/char8_t-is-integral
Specialize boost::is_integral for char8_t when available. Fixes #175.
This commit is contained in:
@ -81,6 +81,9 @@ template<> struct is_integral<char16_t> : public true_type{};
|
||||
#ifndef BOOST_NO_CXX11_CHAR32_T
|
||||
template<> struct is_integral<char32_t> : public true_type{};
|
||||
#endif
|
||||
#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
|
||||
template<> struct is_integral<char8_t> : public true_type{};
|
||||
#endif
|
||||
|
||||
#endif // non-CodeGear implementation
|
||||
|
||||
|
@ -154,5 +154,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char16_t>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char32_t>::value, true);
|
||||
#endif
|
||||
|
||||
#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral<char8_t>::value, true);
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
Reference in New Issue
Block a user