diff --git a/hash/test/hash_number_test.cpp b/hash/test/hash_number_test.cpp index ebfe4d4..18756c3 100644 --- a/hash/test/hash_number_test.cpp +++ b/hash/test/hash_number_test.cpp @@ -164,6 +164,12 @@ int main() NUMERIC_TEST(unsigned char, uchar) #ifndef BOOST_NO_INTRINSIC_WCHAR_T NUMERIC_TEST(wchar_t, wchar) +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T + NUMERIC_TEST(char16_t, char16) +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T + NUMERIC_TEST(char32_t, char32) #endif NUMERIC_TEST(short, short) NUMERIC_TEST(unsigned short, ushort) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 76c4897..0d25cc6 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -107,6 +107,16 @@ namespace boost boost::hash_detail::enable_hash_value {}; #endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + +#if !defined(BOOST_NO_CXX11_CHAR32_T) + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + // long_numbers is defined like this to allow for separate // specialization for long_long and int128_type, in case // they conflict.