#pragma once #include "hash.hpp" #include #include /** * Combines the hash 'seed' with the hash of 'value'. * * @param seed A hash that will be mutated * @param value A hashable value */ template void hash_combine(std::size_t &seed, const Value &value) noexcept { constexpr uint32_t shift_left = 6; constexpr uint32_t shift_right = 2; seed ^= std::hash()(value) + GOLDEN_RATIO + (seed << shift_left) + (seed >> shift_right); }