Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost 1.68.0 - boost hashing changed ?
From: Bjorn Reese (breese_at_[hidden])
Date: 2018-10-28 18:05:18


On 10/23/18 11:25 AM, Miguel Ojeda via Boost-users wrote:

> Not only that, but stating that the hash should remain constant across
> C++/Boost releases is basically stating the hash function should be
> fixed forever. That removes all the freedom for improvements when
> future hash functions are discovered or implemented, with better
> properties (which is what happened in the commits I linked).

While I do not disagree with your arguments, we have a special situation
because the algorithm for boost::hash_combine was actually documented in
older Boost releases, including 1.53 that the OP is upgrading from, so
it would have been reasonable to assume that it stayed fixed. It is not
documented in newer releases though:

   https://lists.boost.org/Archives/boost/2014/07/215577.php

The best way to ensure that it is unchanged is to copy the old
boost::hash_combine into your own code.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net