experimental

C++ coroutines: Short-circuiting suspension, part 1--Raymond Chen

The series continue.

C++ coroutines: Short-circuiting suspension, part 1

by Raymond Chen

From the article:

At the start of this series, I gave the basic idea for how the compiler generates code for co_await, but I left out some details for expository simplicity. There are some mysterious steps called “We’re not ready to talk about this step yet.”

Now it’s time to talk about one of those steps...

C++ coroutines: Constructible awaitable or function returning awaitable?--Raymond Chen

The series continue.

C++ coroutines: Constructible awaitable or function returning awaitable?

By Raymond Chen

From the article:

Last time, we learned how to create simple awaitable objects by creating a structure that implements the await_suspend method (and relies on suspend_always to do the coroutine paperwork for us). We can then construct the awaitable object and then co_await on it...