Skip to content

Commit

Permalink
change the __awaiter concept to agree with P3164
Browse files Browse the repository at this point in the history
  • Loading branch information
ericniebler committed Jan 17, 2025
1 parent cab1814 commit b0a0022
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions include/stdexec/__detail/__awaitable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,13 @@ namespace stdexec {
concept __await_suspend_result =
__one_of<_Tp, void, bool> || __is_instance_of<_Tp, __coro::coroutine_handle>;

template <class _Awaiter, class _Promise>
concept __with_await_suspend =
requires(_Awaiter& __awaiter, __coro::coroutine_handle<_Promise> __h) {
{ __awaiter.await_suspend(__h) } -> __await_suspend_result;
};

template <class _Awaiter, class... _Promise>
concept __awaiter = //
requires(_Awaiter& __awaiter) {
requires(_Awaiter& __awaiter, __coro::coroutine_handle<_Promise...> __h) {
__awaiter.await_ready() ? 1 : 0;
{ __awaiter.await_suspend(__h) } -> __await_suspend_result;
__awaiter.await_resume();
} && //
(__with_await_suspend<_Awaiter, _Promise> && ...);
};

# if STDEXEC_MSVC()
// MSVCBUG https://developercommunity.visualstudio.com/t/operator-co_await-not-found-in-requires/10452721
Expand Down

0 comments on commit b0a0022

Please sign in to comment.