Skip to content

Commit

Permalink
i lied, but this time for sure
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishura4 committed Aug 15, 2023
1 parent 6227ca0 commit 5434cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/dpp/coro/awaitable.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ struct awaitable {
*/
template <typename T>
void await_suspend(detail::std_coroutine::coroutine_handle<T> caller) noexcept(noexcept(std::invoke(fun, std::declval<std::function<void(R)>&&>()))) {
std::invoke(fun, [this, caller] <typename T> (T&& api_result) mutable {
result = std::forward<T>(api_result);
std::invoke(fun, [this, caller] <typename R_> (R_&& api_result) mutable {
result = std::forward<R_>(api_result);
caller.resume();
});
}
Expand Down

0 comments on commit 5434cc1

Please sign in to comment.