From 0f448277c5a206f4872b6073dbe8ad7e754fd219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 27 Jul 2024 22:49:42 +0200 Subject: [PATCH] Remove hash_value from string, Boost.ContainerHash hashes containers by default now. --- include/boost/container/string.hpp | 15 --------------- test/string_test.cpp | 6 ------ 2 files changed, 21 deletions(-) diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index b7eaa1a..25723a1 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -3545,21 +3545,6 @@ getline(std::basic_istream& is, basic_string -inline std::size_t hash_value(basic_string, Allocator> const& v) -{ - std::size_t seed = 0; - const Ch *first = v.data(); - - for(std::size_t i = 0, i_max = v.size(); i != i_max; ++i) - { - boost::intrusive::detail::hash_combine_size_t(seed, static_cast(*first)); - ++first; - } - - return seed; -} - }} //GCC 12 has a regression for array-bounds warnings diff --git a/test/string_test.cpp b/test/string_test.cpp index 056e530..b9674df 100644 --- a/test/string_test.cpp +++ b/test/string_test.cpp @@ -524,12 +524,6 @@ struct alloc_propagate_base int main() { - { - boost::container::string a = "abcdefghijklmnopqrstuvwxyz"; - boost::container::hash_value(a); - } - - if(string_test()){ return 1; }