Title
await_transform needs to use as_awaitable
Status
ready
Section
[task.promise]
Submitter
Dietmar Kühl

Created on 2026-02-21.00:00:00 last changed 1 week ago

Messages

Date: 2026-02-27.16:05:19

Proposed resolution:

This wording is relative to N5032.

  1. Change [task.promise] p10 to use as_awaitable in the Effects clause:

    template<class Sch>
      auto await_transform(change_coroutine_scheduler<Sch> sch) noexcept;
    

    -10- Effects: Equivalent to:

    return await_transformas_awaitable(just(exchange(SCHED(*this), scheduler_type(sch.scheduler))), *this);
    
Date: 2026-02-15.00:00:00

[ 2026-02-27; Reflector poll. ]

Set status to Tentatively Ready after 7 votes in favour during reflector poll.

Date: 2026-02-21.00:00:00

In the await_transform overload for change_coroutine_scheduler the return statement repeats the function name instead of using as_awaitable. The return statement needs to be fixed. The change may be editorial.

Note that P3941 recommends removing change_coroutine_scheduler and the corresponding overload of await_transform entirely.

History
Date User Action Args
2026-02-27 16:05:19adminsetmessages: + msg15985
2026-02-27 16:05:19adminsetstatus: new -> ready
2026-02-22 08:35:00adminsetmessages: + msg15971
2026-02-21 00:00:00admincreate