@@ -150,9 +150,7 @@ struct bind_functor : public adapts<T_functor>
150
150
const auto t_end = internal::tuple_end<t_args_size - I_location>(t_args);
151
151
const auto t_with_bound = std::tuple_cat (t_start, t_bound, t_end);
152
152
153
- constexpr const auto seq =
154
- std::make_index_sequence<std::tuple_size<decltype (t_with_bound)>::value>();
155
- return call_functor_operator_parentheses (t_with_bound, seq);
153
+ return std::apply (this ->functor_ , t_with_bound);
156
154
}
157
155
158
156
/* * Constructs a bind_functor object that binds an argument to the passed functor.
@@ -167,12 +165,6 @@ struct bind_functor : public adapts<T_functor>
167
165
private:
168
166
// / The arguments bound to the functor.
169
167
std::tuple<bound_argument<T_bound>...> bound_;
170
-
171
- template <typename T, std::size_t ... Is>
172
- decltype (auto ) call_functor_operator_parentheses(T&& tuple, std::index_sequence<Is...>)
173
- {
174
- return (this ->functor_ )(std::get<Is>(std::forward<T>(tuple))...);
175
- }
176
168
};
177
169
178
170
/* * Adaptor that binds argument(s) to the wrapped functor.
@@ -199,8 +191,7 @@ struct bind_functor<-1, T_functor, T_type...> : public adapts<T_functor>
199
191
const auto t_bound = internal::tuple_transform_each<internal::TransformEachInvoker>(bound_);
200
192
const auto t_with_bound = std::tuple_cat (t_args, t_bound);
201
193
202
- constexpr auto seq = std::make_index_sequence<std::tuple_size<decltype (t_with_bound)>::value>();
203
- return call_functor_operator_parentheses (t_with_bound, seq);
194
+ return std::apply (this ->functor_ , t_with_bound);
204
195
}
205
196
206
197
/* * Constructs a bind_functor object that binds an argument to the passed functor.
@@ -214,13 +205,6 @@ struct bind_functor<-1, T_functor, T_type...> : public adapts<T_functor>
214
205
215
206
// / The argument bound to the functor.
216
207
std::tuple<bound_argument<T_type>...> bound_;
217
-
218
- private:
219
- template <typename T, std::size_t ... Is>
220
- decltype (auto ) call_functor_operator_parentheses(T&& tuple, std::index_sequence<Is...>)
221
- {
222
- return (this ->functor_ )(std::get<Is>(std::forward<T>(tuple))...);
223
- }
224
208
};
225
209
226
210
#ifndef DOXYGEN_SHOULD_SKIP_THIS
0 commit comments