Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost 1.68.0 - boost hashing changed ?
From: Miguel Ojeda (miguel.ojeda.sandonis_at_[hidden])
Date: 2018-10-23 06:45:21


On Mon, Oct 22, 2018 at 7:57 PM Shailja Prasad via Boost-users
<boost-users_at_[hidden]> wrote:
>
> I was trying to upgrade boost 1.53.0 to boost 1.68.0. But, it looks like hashing code generation has changed, since the following line gives two different hashcode for same string input.

Hm... why would you expect the hash to be always the same between
releases, compilers, etc.? I cannot find it with a quick look at
Boost.Hash's docs anything regarding a guarantee of that. If it is
like std::hash, then it is only guaranteed to remain equal for the
duration of the program. In other words, you cannot rely on saving it
nor comparing them to other hashes from other vendors, platforms,
architectures, compiler releases, etc.

Also, taking a quick look at the repository, there were several
changes between 1.53 and 1.68, e.g.:

  https://github.com/boostorg/container_hash/commit/bb2a91bf47354bfce7378394bc0fa84c76ecfe4e
  https://github.com/boostorg/container_hash/commit/309d17f38722b7bd15b804e55d1d8d6c3cd8691a

Cheers,
Miguel


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