From: Alexei Alexandrov (alexei.alexandrov_at_[hidden])
Date: 2006-03-20 16:06:09
Hi Daniel James, you wrote:
> This is fine for most types, but since long long typically has a much
> larger range of values than std::size_t, it will work very badly for
> long long.
Well, the idea of hashing is that developer knows (to some extent) the data values distribution and it's his/her responsibility not to do silly things. For example, boost does provide hash function for vector despite the vector has much more possible combinations that can fit into size_t. long long is just a vector of 2 longs after all... :-)
> I think it's possible to change the definition to one that remains close
> to the spirit of the original specification and works well for the
> larger integer types. I'll be looking into doing this for Boost 1.35.
Looking forward to it. Thanks.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk