This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
as_awaitable(expr, p)
does not define semantics of call if p
is not an lvalueSection: 33.13.1 [exec.as.awaitable] Status: New Submitter: Lewis Baker Opened: 2025-08-27 Last modified: 2025-09-14
Priority: Not Prioritized
View other active issues in [exec.as.awaitable].
View all other issues in [exec.as.awaitable].
View all issues with New status.
Discussion:
The wording in 33.13.1 [exec.as.awaitable] p7 defines the semantics of a call to as_awaitable(expr, p)
where p
is an lvalue. However, it does not specify what the behaviour is if p
is not an lvalue.
as_awaitable(expr, p)
is ill-formed if p
is not an lvalue.
Proposed resolution:
This wording is relative to N5014.
Modify 33.13.1 [exec.as.awaitable] as indicated:
-7-
as_awaitable
is a customization point object. For subexpressionsexpr
andp
where,p
is an lvalueExpr
names the typedecltype((expr))
andPromise
names the typedecay_t<decltype((p))>
, ifp
is not an lvalue,as_awaitable(expr, p)
is ill-formed, otherwiseas_awaitable(expr, p)
is expression-equivalent to, except that the evaluations ofexpr
andp
are indeterminately sequenced: