11 #ifndef TLX_META_CALL_FOREACH_WITH_INDEX_HEADER 12 #define TLX_META_CALL_FOREACH_WITH_INDEX_HEADER 29 namespace meta_detail {
32 template <
size_t Index,
typename Functor,
typename Arg>
38 template <
size_t Index,
typename Functor,
typename Arg,
typename... MoreArgs>
41 call_foreach_with_index_impl<Index + 1>(
42 std::forward<Functor>(f), std::forward<MoreArgs>(rest) ...);
49 template <
typename Functor,
typename... Args>
51 meta_detail::call_foreach_with_index_impl<0>(
52 std::forward<Functor>(f), std::forward<Args>(args) ...);
59 #endif // !TLX_META_CALL_FOREACH_WITH_INDEX_HEADER
Helper for call_foreach_with_index() to save the index as a compile-time index.