Question

As it looks here boost::hash_value always returns a size_t value.

Does boost have a 64 bit hash function as well?

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top