Skip to content

Commit b0a0022

Browse files
committed
change the __awaiter concept to agree with P3164
1 parent cab1814 commit b0a0022

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

include/stdexec/__detail/__awaitable.hpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,13 @@ namespace stdexec {
2626
concept __await_suspend_result =
2727
__one_of<_Tp, void, bool> || __is_instance_of<_Tp, __coro::coroutine_handle>;
2828

29-
template <class _Awaiter, class _Promise>
30-
concept __with_await_suspend =
31-
requires(_Awaiter& __awaiter, __coro::coroutine_handle<_Promise> __h) {
32-
{ __awaiter.await_suspend(__h) } -> __await_suspend_result;
33-
};
34-
3529
template <class _Awaiter, class... _Promise>
3630
concept __awaiter = //
37-
requires(_Awaiter& __awaiter) {
31+
requires(_Awaiter& __awaiter, __coro::coroutine_handle<_Promise...> __h) {
3832
__awaiter.await_ready() ? 1 : 0;
33+
{ __awaiter.await_suspend(__h) } -> __await_suspend_result;
3934
__awaiter.await_resume();
40-
} && //
41-
(__with_await_suspend<_Awaiter, _Promise> && ...);
35+
};
4236

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

0 commit comments

Comments
 (0)