Boost logo

Boost :

Subject: Re: [boost] [hash] Extract module from functional + std::hash_combine
From: Daniel James (dnljms_at_[hidden])
Date: 2017-12-19 14:51:41


On 19 December 2017 at 14:12, Richard Hodges via Boost
<boost_at_[hidden]> wrote:
>
> Whoever decided to downgrade boost hash before solidifying its uselessness
> in the c++11 standard?

The C++11 std::hash was specified before boost::hash was created, so
it wasn't downgraded. There have been several proposals for improving
std::hash, some of which do have advantages over `boost::hash`, but
the standards committee hasn't settled on any of them. But it's
possible that the next standard will include 'hash_combine', as well
as functions using variadic arguments:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3876.pdf

This is a bit of a compromise that makes it easier to implement custom
hash functions but doesn't prevent any of the other proposal from
going forward. I was thinking about implementing the variadic
functions in that paper for 1.67.0, but I think I'll wait to see if
it's added to the standard.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk