2011/5/20 Frédéric Bron
No sorry it isn't. If you're just hashing strings, you might want to try the 32 bit version of murmurhash3:
No I am hashing strings and double so I have copied the boost code and replaced size_t by boost::uint32_t. Works fine. The hash type could be a template parameter, couldn't it?
Not really, since the hashing is done by 'hash_value' which can be user defined. I'm not sure if this is a good idea, but I could use another parameter to specify the hash type. Might have odd consequences for ADL. Something like: // Default to using the std::size_t version. template < typename T, typename HashType> HashType hash_value(T const& value, HashType*) { return hash_value(value); } template <typename HashType> HashType hash_value(double value, HashType* hash_type) { return boost::hash_detail::float_hash_value(value, hash_type); } template <typename HashType> HashType hash_value(long value, HashType*) { return static_cast<HashType>(value); } // etc.