The co_return Keyword

Understand the use of the 'co_return' keyword in C++20.

We'll cover the following

A coroutine uses co_return as its return statement.

A future

Admittedly, the coroutine in the following program is the simplest coroutine. I can imagine, that still does something meaningful: it automatically stores the result of its invocation.

Get hands-on with 1200+ tech skills courses.