Accept move-only callables in InvokeArguments

PiperOrigin-RevId: 594223533
Change-Id: I491fae7d851d4e0df07fb3627416949071fec8d6
This commit is contained in:
Abseil Team
2023-12-28 04:03:13 -08:00
committed by Copybara-Service
parent 96eadf659f
commit dddb219c3e
2 changed files with 14 additions and 2 deletions

View File

@@ -606,7 +606,7 @@ struct InvokeArgumentAction {
internal::FlatTuple<Args &&...> args_tuple(FlatTupleConstructTag{},
std::forward<Args>(args)...);
return params.Apply([&](const Params &...unpacked_params) {
auto &&callable = args_tuple.template Get<index>();
auto &&callable = std::move(args_tuple.template Get<index>());
return internal::InvokeArgument(
std::forward<decltype(callable)>(callable), unpacked_params...);
});