Boost logo

Boost :

Subject: Re: [boost] [hash] Extract module from functional + std::hash_combine
From: Peter Dimov (lists_at_[hidden])
Date: 2017-12-19 17:18:54

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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at