Skip to content

Commit

Permalink
refactor(string_view_base): directly call boost::hash_range
Browse files Browse the repository at this point in the history
Since boostorg/core@92f6cfb in Boost.Core, we have been getting "error: use of undeclared identifier 'hash_value'" because hash_value is not part of the interface of core::string_view.

This commit implements the same strategy as previously used in Boost.Core to avoid breaking changes.
  • Loading branch information
alandefreitas committed Nov 11, 2024
1 parent 91f81f8 commit 4adf3fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/boost/url/grammar/string_view_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include <utility>

namespace boost {

// forward declaration of boost::hash_range from ContainerHash
template<class It> std::size_t hash_range( It, It );

namespace urls {
namespace grammar {

Expand Down Expand Up @@ -864,7 +868,7 @@ class string_view_base
hash_value(
string_view_base const& s) noexcept
{
return hash_value(s.s_);
return boost::hash_range( s.s_.begin(), s.s_.end() );
}

/** Format a string to an output stream
Expand Down

0 comments on commit 4adf3fc

Please sign in to comment.