mirror of
https://github.com/boostorg/utility.git
synced 2026-01-26 09:02:19 +01:00
Implement boost hash for string_view
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/utility/string_view_fwd.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <stdexcept>
|
||||
@@ -690,6 +691,10 @@ namespace boost {
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class charT, class traits>
|
||||
std::size_t hash_value(basic_string_view<charT, traits> s) {
|
||||
return boost::hash_range(s.begin(), s.end());
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user