From 482f0911e1789a0ae3f131a7167c3e252de79388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 5 Jan 2021 00:07:02 +0100 Subject: [PATCH] Use #include instead of #include to avoid pulling unneeded STL headers. --- include/boost/container/string.hpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index 07c174b..330c09e 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -48,7 +48,7 @@ #include #include -#include +#include #include // for char_traits #include @@ -3546,7 +3546,16 @@ getline(std::basic_istream& is, basic_string inline std::size_t hash_value(basic_string, Allocator> const& v) { - return hash_range(v.begin(), v.end()); + 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; } }}