Implement boost hash for string_view

This commit is contained in:
Dimitrij Mijoski
2018-04-20 13:42:07 +02:00
parent 7709f0e430
commit 6ad6bc005c
4 changed files with 16 additions and 0 deletions

View File

@@ -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