From f51f68fe9337668a1c96c06058bf88ce4fa29e11 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 30 Oct 2022 03:01:05 +0200 Subject: [PATCH] Do not use the u8string and u8string_view typedefs, because char8_t availability does not guarantee their presence --- include/boost/container_hash/hash.hpp | 4 ++-- test/hash_is_avalanching_test.cpp | 2 +- test/hash_is_avalanching_test2.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/container_hash/hash.hpp b/include/boost/container_hash/hash.hpp index a1afe7c..306c279 100644 --- a/include/boost/container_hash/hash.hpp +++ b/include/boost/container_hash/hash.hpp @@ -643,7 +643,7 @@ namespace boost // boost::is_integral is false, but should be true (https://github.com/boostorg/type_traits/issues/175) #if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L - template<> struct hash_is_avalanching< boost::hash< std::u8string > >: boost::true_type {}; + template<> struct hash_is_avalanching< boost::hash< std::basic_string > >: boost::true_type {}; #endif #if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) @@ -651,7 +651,7 @@ namespace boost template struct hash_is_avalanching< boost::hash< std::basic_string_view > >: boost::is_integral {}; #if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L - template<> struct hash_is_avalanching< boost::hash< std::u8string_view > >: boost::true_type {}; + template<> struct hash_is_avalanching< boost::hash< std::basic_string_view > >: boost::true_type {}; #endif #endif diff --git a/test/hash_is_avalanching_test.cpp b/test/hash_is_avalanching_test.cpp index fdac220..2591b47 100644 --- a/test/hash_is_avalanching_test.cpp +++ b/test/hash_is_avalanching_test.cpp @@ -45,7 +45,7 @@ int main() #if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L - BOOST_TEST_TRAIT_TRUE(( hash_is_avalanching< boost::hash > )); + BOOST_TEST_TRAIT_TRUE(( hash_is_avalanching< boost::hash< std::basic_string > > )); #endif diff --git a/test/hash_is_avalanching_test2.cpp b/test/hash_is_avalanching_test2.cpp index 33a4992..5224423 100644 --- a/test/hash_is_avalanching_test2.cpp +++ b/test/hash_is_avalanching_test2.cpp @@ -50,7 +50,7 @@ int main() #if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L - BOOST_TEST_TRAIT_TRUE(( hash_is_avalanching< boost::hash > )); + BOOST_TEST_TRAIT_TRUE(( hash_is_avalanching< boost::hash< std::basic_string_view > > )); #endif