Created on 2020-10-19.00:00:00 last changed 11 months ago
A reference to a parameter in the function-body of the coroutine and in the call to the coroutine promise constructor is replaced by a reference to its copy.
replacing it with new wording in 22.214.171.124 [expr.prim.id.unqual] paragraph 1:
An identifier that names a coroutine parameter refers to the copy of the parameter (9.5.4 [dcl.fct.def.coroutine]).
This new approach no longer covers coroutine parameters passed to a promise constructor, since the constructor call is implicit, as described in 126.96.36.199 [expr.prim.id.unqual] paragraph 5.
Change 188.8.131.52 [expr.prim.id.unqual] paragraph 4 as follows:
In the following, pi is an lvalue of type Pi, where p1 denotes *this and pi+1 denotes the ith function parameter for a non-static member function, and pi denotes the ith function parameter otherwise.
Change 184.108.40.206 [expr.prim.id.unqual] bullet 5.7 as follows:
A coroutine behaves as if its function-body were replaced by...
promise-constructor-arguments is determined as follows: overload resolution is performed on a promise constructor call created by assembling an argument list with lvalues
p1 ... pn. If a viable constructor is found (12.2.3 [over.match.viable]), then promise-constructor-arguments is ( p1, ... , pn), otherwise promise-constructor-arguments is empty.