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; } }}