21 #ifndef INCLUDE_FKIE_MESSAGE_FILTERS_HELPERS_TUPLE_H_ 22 #define INCLUDE_FKIE_MESSAGE_FILTERS_HELPERS_TUPLE_H_ 31 template<std::size_t N,
typename... Ts>
using select_nth = std::tuple_element_t<N, std::tuple<Ts...>>;
33 template<
class Function, std::size_t... Is>
36 return f(std::integral_constant<std::size_t, Is>{}...);
39 template<std::
size_t N,
class Function>
45 template<
class Function, std::size_t... Is>
48 (void)std::initializer_list<int>{ (f(std::integral_constant<std::size_t, Is>{}),
void(), 0)... };
51 template<std::
size_t N,
class Function>
57 template<std::
size_t N,
class Function>
63 if (Is == i) f(std::forward<decltype(Is)>(Is));
std::tuple_element_t< N, std::tuple< Ts... > > select_nth
auto index_apply_impl(Function f, std::index_sequence< Is... >)
void for_each_apply_impl(Function f, std::index_sequence< Is... >)
void for_each_apply(Function f)
void select_apply(std::size_t i, Function f)
auto index_apply(Function f)