Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-12-20


2754. Using *this in explicit object member functions that are coroutines

Section:9.6.4  [dcl.fct.def.coroutine]    Status:CD7    Submitter:Christof Meerwald    Date:2023-06-23

[Accepted as a DR at the November, 2023 meeting.]

Subclause 9.6.4 [dcl.fct.def.coroutine] paragraph 4 specifies:

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

An explicit object member function is a non-static member function,but there is nothis.

Proposed resolution (approved by CWG 2023-07-14):

Change in 9.6.4 [dcl.fct.def.coroutine] paragraph 4 as follows:

In the following, pi is an lvalue of type Pi , where p1 denotes theobject parameter and pi+1 denotes the ith non-object functionparameter fora non-statican implicit objectmember function, and pi denotes the ith function parameterotherwise. Fora non-statican implicit objectmember function, q1 is an lvalue that denotes*this; anyother qi is an lvalue that denotes the parameter copy corresponding topi, as described below.



[8]ページ先頭

©2009-2026 Movatter.jp