co_invoke
Summary: [Folly] `folly::coro::co_invoke`, both generalizing and constraining `folly::coro::lambda` and modeling on `std::invoke`. Constrained only to work on callables which return `Task<_>` in order to be sure that `invoke_result_t<F, A...>` is the same as the type of `co_await <expr>` where `expr` has type `invoke_result_t<F, A...>`. We know that this constraint holds for `Task<_>`. The alternative is to make it work for all types and use `decltype(auto)` as the return type. Reviewed By: andriigrynenko Differential Revision: D13523334 fbshipit-source-id: 9af220dd45d6b9f6676c5ef49ba2e01395babd72
Showing
Please register or sign in to comment