cplusplus / CWG

Core Working Group
24 stars 7 forks source link

CWG2754 [dcl.fct.def.coroutine] Cannot use "*this" in explicit object member function #348

Closed cmeerw closed 10 months ago

cmeerw commented 1 year ago

Full name of submitter (unless configured in github; will be published with the issue): Christof Meerwald

Reference (section label): [dcl.fct.def.coroutine]

Link to reflector thread (if any): -

Issue description: [dcl.fct.def.corouine]/4 says

In the following, pi is an lvalue of type Pi, where p1 denotes the object parameter and pi+1 denotes the ith non-object function parameter for a non-static member function, and pi denotes the ith function parameter otherwise. For a non-static member function, q1 is an lvalue that denotes *this; any other qi is an lvalue that denotes the parameter copy corresponding to pi, as described below.

An explicit object member function is a non-static member function, but there is no "*this" for an explicit object member function.

Suggested resolution:

replace "a non-static member function" with "an implicit object member function" above (twice)

jensmaurer commented 1 year ago

CWG2754