Is there a 64 bit version of boost::hash_value

boost, hash-function

Solution

All of the hash routines that I know of (both `boost::hash` and `std::hash1` in `C++11`) hash things to a `size_t` value.

The representation of `size_t` (like `int`) varies from platform to platform.

The answer to your question in the general case is no - there is no 64-bit version of `boost::hash_value`.

If you are running on a platform where `size_t` is a 64 bit quantity (say, `x86_64`) then yes, `boost::hash_value` will be 64 bits.

Problem

As it looks here boost::hash_value always returns a size_t value. Does boost have a 64 bit hash function as well?

Original source