Date: Tue, 14 Apr 2026 15:44:37 +0200
I saw indeed that they had this built-in and rely on the `as_awaitable`
function to become coroutines (not a huge fan of this API design, but I
digress), but I couldn't find anything on the promise_type it returns. How
will this is `as_awaitable` work? What will it return?
If it returns a standard-provided promise_type then we can happily discard
this thread.
Best,
Rhidian
Op di 14 apr 2026 om 15:26 schreef Ville Voutilainen <
ville.voutilainen_at_[hidden]>:
> On Tue, 14 Apr 2026 at 13:05, Rhidian De Wit via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> >
> > There's plenty of coroutine frameworks out there with cancellation
> built-in, but I'd like it to be part of the C++ standard, not yet another
> library someone must include to be able to use the C++ coroutines.
> > Currently, people have no choice but to:
> > A) implement their own promise types (with all of the required knowledge
> potentially being a problem), or
> > B) Rely on external libraries
> >
> > C++20 introduced coroutines, so I find it pretty natural that the next
> step is to also provide a standardized way to use coroutines rather than
> just providing the framework.
>
> C++26 introduces senders, which are awaitable and cancellable (and, of
> course, bindable to continuations). So the next step you're suggesting
> has already been taken.
>
function to become coroutines (not a huge fan of this API design, but I
digress), but I couldn't find anything on the promise_type it returns. How
will this is `as_awaitable` work? What will it return?
If it returns a standard-provided promise_type then we can happily discard
this thread.
Best,
Rhidian
Op di 14 apr 2026 om 15:26 schreef Ville Voutilainen <
ville.voutilainen_at_[hidden]>:
> On Tue, 14 Apr 2026 at 13:05, Rhidian De Wit via Std-Proposals
> <std-proposals_at_[hidden]> wrote:
> >
> > There's plenty of coroutine frameworks out there with cancellation
> built-in, but I'd like it to be part of the C++ standard, not yet another
> library someone must include to be able to use the C++ coroutines.
> > Currently, people have no choice but to:
> > A) implement their own promise types (with all of the required knowledge
> potentially being a problem), or
> > B) Rely on external libraries
> >
> > C++20 introduced coroutines, so I find it pretty natural that the next
> step is to also provide a standardized way to use coroutines rather than
> just providing the framework.
>
> C++26 introduces senders, which are awaitable and cancellable (and, of
> course, bindable to continuations). So the next step you're suggesting
> has already been taken.
>
-- Rhidian De Wit Software Engineer - Barco
Received on 2026-04-14 13:44:51
