Skip to content

Commit

Permalink
g++11 fix, take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishura4 committed Aug 15, 2023
1 parent b13caae commit 86765d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/dpp/coro/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ struct task_promise_base {
* Emulates the default behavior and sets is_sync to false if the awaited object is not ready.
*/
template <typename T>
T await_transform(T&& expr) {
decltype(auto) await_transform(T&& expr) {
if constexpr (requires { expr.operator co_await(); }) {
auto awaiter = expr.operator co_await();
if (!awaiter.await_ready())
Expand All @@ -277,7 +277,7 @@ struct task_promise_base {
else {
if (!expr.await_ready())
is_sync = false;
return (expr);
return static_cast<T&&>(expr);
}
}

Expand Down

0 comments on commit 86765d5

Please sign in to comment.