LeviLamina
Loading...
Searching...
No Matches
TupleHash.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5#include <tuple>
6
7#include "ll/api/utils/HashUtils.h"
8
9namespace mce::Math {
10
11struct TupleHash {
12 template <typename... Args>
13 size_t operator()(std::tuple<Args...> const& t) const noexcept {
14 ll::hash_utils::HashCombiner combiner;
15
16 std::apply([&](auto const&... args) { (combiner.add(args), ...); }, t);
17 return combiner.hash();
18 }
19};
20
21} // namespace mce::Math
Definition TupleHash.h:11