diff --git a/include/boost/container_hash/detail/hash_range.hpp b/include/boost/container_hash/detail/hash_range.hpp index 4388870..28fd239 100644 --- a/include/boost/container_hash/detail/hash_range.hpp +++ b/include/boost/container_hash/detail/hash_range.hpp @@ -27,6 +27,14 @@ template<> struct is_char_type: public boost::true_type {}; template<> struct is_char_type: public boost::true_type {}; template<> struct is_char_type: public boost::true_type {}; +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L +template<> struct is_char_type: public boost::true_type {}; +#endif + +#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L +template<> struct is_char_type: public boost::true_type {}; +#endif + #endif template diff --git a/test/hash_container_test.cpp b/test/hash_container_test.cpp index f24c3d5..efb62f2 100644 --- a/test/hash_container_test.cpp +++ b/test/hash_container_test.cpp @@ -48,5 +48,13 @@ int main() test(); test(); +#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L + test(); +#endif + +#if defined(__cpp_lib_byte) && __cpp_lib_byte >= 201603L + test(); +#endif + return boost::report_errors(); }