summaryrefslogtreecommitdiff
path: root/asl/string_view.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'asl/string_view.hpp')
-rw-r--r--asl/string_view.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/asl/string_view.hpp b/asl/string_view.hpp
index c75695c..533a4a8 100644
--- a/asl/string_view.hpp
+++ b/asl/string_view.hpp
@@ -85,6 +85,12 @@ public:
if (m_size != other.m_size) { return false; }
return memcmp(m_data, other.m_data, m_size) == 0;
}
+
+ template<typename H>
+ friend H AslHashValue(H h, string_view sv)
+ {
+ return H::combine(H::combine_bytes(h, as_bytes(sv.as_span())), sv.size());
+ }
};
} // namespace asl