Skip to content

Instantly share code, notes, and snippets.

View aesophor's full-sized avatar
💜

aesophor aesophor

💜
View GitHub Profile
@aesophor
aesophor / tuple_hash.hpp
Created May 31, 2023 14:31
C++17 Tuple Hash
template <typename T, typename... Ts>
constexpr void hash_combine(size_t &seed, const T &t, const Ts &...ts) {
seed ^= std::hash<T>{}(t) + 0x9e3779b97f4a7c15 + (seed << 6) + (seed >> 2);
if constexpr (sizeof...(ts) > 0) {
hash_combine(seed, ts...);
}
}
template <typename T>
cat /flag-415cd468353da8d26974ae6f8a7d9b30a830b8b4