16[[nodiscard]]
inline size_t hash_mix_two(
size_t hash1,
size_t hash2)
noexcept
18 if constexpr (
sizeof(size_t) == 8) {
19 return hash1 + 0x9e3779b97f681800 + (hash2 << 6) + (hash2 >> 2);
20 }
else if constexpr (
sizeof(size_t) == 4) {
21 return hash1 + 0x9e3779b9 + (hash2 << 6) + (hash2 >> 2);
27template<
typename First,
typename Second,
typename... Args>
28[[nodiscard]]
size_t hash_mix(First &&first, Second &&second, Args &&... args)
noexcept {
29 if constexpr (
sizeof...(args) == 0) {
31 std::hash<std::remove_cvref_t<First>>{}(std::forward<First>(first)),
32 std::hash<std::remove_cvref_t<Second>>{}(std::forward<Second>(second))
36 std::hash<std::remove_cvref_t<First>>{}(std::forward<First>(first)),
37 hash_mix(std::forward<Second>(second), std::forward<Args>(args)...)