Skip to content

Commit

Permalink
Fix case of having no index at all
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Feb 10, 2022
1 parent fbcdc05 commit 1517bdc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lmdb-typed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ private:
func(std::get<0>(tuple));
}
};
template <class Tuple> struct IndexIterator<Tuple, 0> {
static inline void apply(Tuple &tuple, auto &&func)
{
CPP_UTILITIES_UNUSED(tuple)
CPP_UTILITIES_UNUSED(func)
}
};
void forEachIndex(auto &&func)
{
IndexIterator<tuple_t, std::tuple_size_v<tuple_t>>::apply(d_tuple, std::forward<decltype(func)>(func));
Expand Down

0 comments on commit 1517bdc

Please sign in to comment.