Subject: Re: [boost] [hash] regular behaviour of hash function for double values
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-02-01 12:35:06
On Wednesday, February 01, 2012 18:20:33 Roman Perepelitsa wrote:
> std::hash can be specialized for user defined types. If unordered
> containers were to assume that std::has does bit mixing, users would have
> harder time specializing std::hash which could lead to performance bugs.
When writing a custom hash function, whether std::hash specialization or not,
one cannot rely on bit mixing in the container because it is not mandated by
the standard. So one would write the function with bit mixing anyway.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk