P1610R0 Rename await_resume() to await_result()

By: Mathias Stearn (MongoDB)
Date: 2019-03-10

What?

The coroutine feature recently approved for C++20 defines an API for types that support being co_awaited, consisting of three methods: await_ready(), await_suspend(), and await_resume(). This paper proposes to rename the last to await_result(), which better reflects its purpose and effects.

Why?

Summary: This change makes the Awaitable API more intuitive, therefore easier to teach and learn. This is important because that API is the second layer in the “Gor Table” from section 4.4 of P1362, so it will be the first form of coroutine customization most users will do.

Why not?

What to do about the TS?

If we want to ease the transition, we can add explicit wording to the TS to work with both names. We would need to either prefer one if both are present, or just make that ill-formed.