19 size_t operator()(TT
const& tt)
const {
20 return std::hash<TT>()(tt);
26 inline void hash_combine(std::size_t& seed, T
const& v) {
33 template<typename Tuple, size_t Index = std::tuple_size<Tuple>::value - 1>
34 struct HashValueImpl {
35 static void apply(
size_t& seed, Tuple
const& tuple) {
38 HashValueImpl<Tuple, Index -1>::apply(seed, tuple);
39 hash_combine(seed, std::get<Index>(tuple));
45 template<
typename Tuple>
46 struct HashValueImpl<Tuple, 0> {
47 static void apply(
size_t& seed, Tuple
const& tuple) {
48 hash_combine(seed, std::get<0>(tuple));
55 template<
typename... TT>
56 struct hash<std::tuple<TT...>> {
62 HashValueImpl<std::tuple<TT...> >::apply(seed, tt);
size_t operator()(std::tuple< TT... > const &tt) const
Base struct for types which have std::hash() defined.