coord/ops: std::hash should return a size_t

This commit is contained in:
Danny Robson 2019-05-12 07:52:19 +10:00
parent 347b13ee60
commit dccc4fbbf7

View File

@ -1514,12 +1514,12 @@ namespace std {
struct hash<K<S,T>> : enable_if<
::cruft::is_coord_v<K<S,T>>
> {
uint32_t operator() (K<S,T> k) const {
uint32_t v = 0xdeadbeef;
for (T t: k)
constexpr std::size_t
operator() (K<S,T> k) const noexcept
{
std::size_t v = 0xdeadbeef;
for (T const &t: k)
v = ::cruft::hash::mix (t, v);
return v;
}
};