Title
co_await in a lambda-expression
Status
tentatively ready
Section
7.6.2.4 [expr.await]
Submitter
Jim X

Created on 2022-12-12.00:00:00 last changed 3 weeks ago

Messages

Date: 2023-11-16.21:27:26

Proposed resolution (approved by CWG 2023-11-11):

Change in 7.6.2.4 [expr.await] paragraph 2 as follows:

An await-expression shall appear only in as a potentially-evaluated expression within the compound-statement of a function-body or lambda-expression, in either case outside of a handler (14.1 [except.pre]). ...
Date: 2023-11-16.21:27:26

Subclause 7.6.2.4 [expr.await] paragraph 2 disallows an await-expression to appear in the body of a lambda-expression:

An await-expression shall appear only in a potentially-evaluated expression within the compound-statement of a function-body outside of a handler (14.1 [except.pre]). ...

This is probably unintended.

History
Date User Action Args
2023-11-16 21:27:26adminsetmessages: + msg7518
2023-11-16 21:27:26adminsetstatus: open -> tentatively ready
2022-12-12 00:00:00admincreate