56 unsigned operator()(
const T& obj,
unsigned seed=0)
const
67struct Hash<std::nullptr_t>
69 unsigned operator()(std::nullptr_t,
unsigned seed=0)
const noexcept
79 unsigned operator()(
const void*
const ptr,
unsigned seed=0)
const
81 const uintptr_t addr = uintptr_t(ptr);
91#undef FOAM_HASH_SPECIALIZATION
92#define FOAM_HASH_SPECIALIZATION(Type) \
99 unsigned operator()(const Type val) const \
101 return static_cast<unsigned>(val); \
103 unsigned operator()(const Type val, unsigned seed) const \
105 return Foam::Hasher(&val, sizeof(Type), seed); \
114#undef FOAM_HASH_SPECIALIZATION
#define FOAM_HASH_SPECIALIZATION(Type)
Miscellaneous hashing functions, mostly from Bob Jenkins.
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
unsigned operator()(std::nullptr_t, unsigned seed=0) const noexcept
unsigned operator()(const void *const ptr, unsigned seed=0) const
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
unsigned operator()(const T &obj, unsigned seed=0) const