11 #ifndef TLX_META_VMAP_FOREACH_WITH_INDEX_HEADER 12 #define TLX_META_VMAP_FOREACH_WITH_INDEX_HEADER 31 namespace meta_detail {
34 template <
size_t Index,
typename Functor,
typename Arg>
36 return std::make_tuple(
41 template <
size_t Index,
typename Functor,
typename Arg,
typename... MoreArgs>
45 return std::tuple_cat(
46 std::make_tuple(std::move(x)),
47 vmap_foreach_with_index_impl<Index + 1>(
48 std::forward<Functor>(f), std::forward<MoreArgs>(rest) ...));
55 template <
typename Functor,
typename... Args>
57 return meta_detail::vmap_foreach_with_index_impl<0>(
58 std::forward<Functor>(f), std::forward<Args>(args) ...);
65 #endif // !TLX_META_VMAP_FOREACH_WITH_INDEX_HEADER
Helper for call_foreach_with_index() to save the index as a compile-time index.