49 class RPP_EMPTY_BASES
tuple_impl<std::index_sequence<Indices...>, Args...> :
private tuple_leaf<Indices, Args>...
54 template<
typename... TArgs>
61 template<
typename... TArgs, std::invocable<TArgs&&..., Args&...> Callable>
62 auto apply(Callable&& callable, TArgs&&... args)
64 return std::forward<Callable>(callable)(std::forward<TArgs>(args)...,
static_cast<tuple_leaf<Indices, Args>*
>(
this)->get()...);
67 template<
typename... TArgs, std::invocable<TArgs&&..., Args...> Callable>
68 auto apply(Callable&& callable, TArgs&&... args)
const
70 return std::forward<Callable>(callable)(std::forward<TArgs>(args)...,
static_cast<const tuple_leaf<Indices, Args>*
>(
this)->get()...);
74 requires (I <
sizeof...(Args))
75 const auto& get()
const
81 requires (I <
sizeof...(Args))
88 template<
size_t I,
typename T>
93 constexpr static auto type_at_index() ->
decltype(type_at_index_impl<I>(std::declval<tuple_impl*>()));
96 requires (I <
sizeof...(Args))
97 using type_at_index_t =
decltype(type_at_index<I>());