This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


2472. Value categories in await-expressions

Section: 7.6.2.4  [expr.await]     Status: NAD     Submitter: Daveed Vandevoorde     Date: 2021-01-18

According to 7.6.2.4 [expr.await] bullets 3.3 and 3.4,

Evaluation of an await-expression involves the following auxiliary types, expressions, and objects:

However, the temporary materialization conversion produces an xvalue, not an lvalue. Should e be a glvalue instead of an lvalue?

Rationale (February, 2021):

The specification is as intended; o is converted to an lvalue if it is an xvalue result of the temporary materialization conversion. e is used in both bullets 3.7 and 3.8; if it were an xvalue instead of an lvalue, the call to await_suspend could steal e's resources and leave the call to await_resume with a defunct object, which would be undesirable.