Closed xmh0511 closed 1 year ago
[class.mfct.non.static] applies the transformation to both explicit object member functions and static member functions, intentionally so. Then, [expr.prim.this] p3 makes the so-transformed "this" ill-formed in the two mentioned contexts. Which is exactly what we want.
There is no intention to perform an implicit transformation for explicit object member functions. Did you find any wording to the contrary?
In short, I'm not seeing an issue here.
Oh, you're right. The intent is that any id-expression that refers to a non-static member and is not qualified with object expression cannot appear in explicit object parameter member function or static member function, which would make the transformation cause ill-formed.
Full name of submitter (unless configured in github; will be published with the issue): Jim X
[class.mfct.non.static] says
The wording does not exclude the transformation for the explicit object member function of the current class.
[expr.prim.this] p3 says
So, the transformation in the explicit object member function does not make sense.
Suggested Resolution
It does not clear whether we intend to give a similar transformation by using an id-expression that denotes the explicit object parameter to take the place of
*this
when the id-expression that denotes non-static member appears in the explicit object parameter member functions.