
20 May
2011
20 May
'11
9:17 a.m.
I would like this code return the same hash on different machines: #include <iostream> #include <boost/functional/hash.hpp> int main() { boost::hash<std::string> hasher; std::cout<<hasher("abcd"); return 0; } But I get 1244709680 when size_t is 32 bits and 706246339511088 when size_t is 64 bits. Is it possible to have hash work with fixed width uint32_t instead of size_t? Frédéric