19 Dec
2017
19 Dec
'17
5:18 p.m.
Howard Hinnant wrote:
When I asked, I was told the functionality was the same or essentially the same as boost::hash_combine.
It's not. Well the functionality is the same, but the interface of boost::hash_combine is incompatible with the proposed std::hash_combine. boost::hash_combine is what's _hash_combine in P0814R0. std::hash_combine(t1, ..., tN) in P0814R0 is a pure function that returns the combined hash value of its arguments. boost::hash_combine(v, t) mixes the hash value of t into the state v. boost::hash_combine is incremental and is naturally extensible into using a different state than size_t for the first argument. The proposed std::hash_combine is neither.