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