
1 Feb
2012
1 Feb
'12
5:35 p.m.
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.