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

Created on 2022-12-12.00:00:00 last changed 1 month ago

Messages

Date: 2022-12-18.14:51:33

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.

Possible resolution:

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]). ...
History
Date User Action Args
2022-12-12 00:00:00admincreate