diff options
Diffstat (limited to 'src/support')
-rw-r--r-- | src/support/hash.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/support/hash.h b/src/support/hash.h index fc8b358f2..b99902616 100644 --- a/src/support/hash.h +++ b/src/support/hash.h @@ -28,7 +28,10 @@ template<typename T> inline std::size_t hash(const T& value) { } // Combines two digests into the first digest. Use instead of `rehash` if -// `otherDigest` is another digest and not a `size_t` value. +// `otherDigest` is another digest and not a `size_t` value. This is also useful +// when you want deterministic behavior across systems, as this method does not +// call std::hash, so it does not depend on the behavior of the local machine's +// C++ standard library implementation. inline void hash_combine(std::size_t& digest, const std::size_t otherDigest) { // see: boost/container_hash/hash.hpp // The constant is the N-bits reciprocal of the golden ratio: |