small improvement in std::pair hashing

This commit is contained in:
greg
2019-11-04 07:56:25 -05:00
parent 52ccdcdb71
commit 2399d65468
+1 -1
View File
@@ -323,7 +323,7 @@ using HashState = HashStateBase<size_t>;
template<class T1, class T2>
struct Hash<std::pair<T1, T2>> {
size_t operator()(std::pair<T1, T2> const& p) const noexcept {
return phmap::HashState().combine(0, p.first, p.second);
return phmap::HashState().combine(phmap::Hash<T1>()(p.first), p.second);
}
};