70 template<
typename Tup,
typename Fun, std::size_t... Is>
75 decltype(fun(detail::adl_get<Is>(
static_cast<Tup &&
>(tup))))...>{
76 fun(detail::adl_get<Is>(
static_cast<Tup &&
>(
79 template<typename Tup0, typename Tup1, typename Fun, std::size_t... Is>
80 static constexpr auto CPP_auto_fun(impl2)(Tup0 &&tup0, Tup1 &&tup1, Fun &fun,
84 decltype(fun(detail::adl_get<Is>(
static_cast<Tup0 &&
>(tup0)),
85 detail::adl_get<Is>(
static_cast<Tup1 &&
>(tup1))))...>{
86 fun(detail::adl_get<Is>(
static_cast<Tup0 &&
>(tup0)),
87 detail::adl_get<Is>(
static_cast<Tup1 &&
>(tup1)))...}
90 template<
typename Tup,
typename Fun>
91 constexpr auto CPP_auto_fun(
operator())(Tup &&tup, Fun fun)(
const)
93 return tuple_transform_fn::impl1(
94 static_cast<Tup &&
>(tup), fun,
95 tuple_indices_t<Tup>{})
97 template<
typename Tup0,
typename Tup1,
typename Fun>
98 constexpr auto CPP_auto_fun(
operator())(Tup0 &&tup0, Tup1 &&tup1, Fun fun)(
const)
100 return tuple_transform_fn::impl2(
static_cast<Tup0 &&
>(tup0),
101 static_cast<Tup1 &&
>(tup1), fun,
102 tuple_indices_t<Tup0>{})
114 template<
typename Tup,
typename Val,
typename Fun>
115 static constexpr Val impl(Tup &&, Val val, Fun &)
120 template<std::size_t I0, std::size_t... Is,
typename Tup,
typename Val,
122 static constexpr auto CPP_auto_fun(impl)(Tup &&tup, Val val, Fun &fun)
124 return Impl::template impl<Is...>(
125 static_cast<Tup &&
>(tup),
126 fun(std::move(val), detail::adl_get<I0>(
static_cast<Tup &&
>(tup))),
129 template<typename Tup, typename Val, typename Fun, std::size_t... Is>
130 static constexpr auto CPP_auto_fun(impl2)(Tup &&tup, Val val, Fun &fun,
133 return tuple_foldl_fn::impl<Is...>(
static_cast<Tup &&
>(tup),
138 template<
typename Tup,
typename Val,
typename Fun>
139 constexpr auto CPP_auto_fun(
operator())(Tup &&tup, Val val, Fun fun)(
const)
141 return tuple_foldl_fn::impl2(
static_cast<Tup &&
>(tup),
144 tuple_indices_t<Tup>{})
156 template<
typename Tup,
typename Fun, std::size_t... Is>
159 (void)std::initializer_list<int>{
160 ((void)fun(detail::adl_get<Is>(
static_cast<Tup &&
>(tup))), 42)...};
164 template<
typename Tup,
typename Fun>
165 constexpr Fun operator()(Tup && tup, Fun fun)
const
167 return tuple_for_each_fn::impl(
168 static_cast<Tup &&
>(tup), fun, tuple_indices_t<Tup>{}),
_t< detail::make_indices_< N, index_sequence< 0 >, detail::strategy_(1, N)> > make_index_sequence
Generate index_sequence containing integer constants [0,1,2,...,N-1].
Definition meta.hpp:473