Full name of submitter (unless configured in github; will be published with the issue): Jim X
[class.mfct.non.static] p2 says:
When an id-expression ([expr.prim.id]) that is neither part of a class member access syntax ([expr.ref]) nor the unparenthesized operand of the unary & operator ([expr.unary.op]) is used where the current class is X ([expr.prim.this]), ..., the id-expression is transformed into a class member access expression ([expr.ref]) using (*this) as the postfix-expression to the left of the . operator.
Consider this case:
struct A{
int a;
void show(){
int* r = &a; // #1
}
};
According to [class.mfct.non.static] p2, id-expression a(especially, unqualified-id) is the operand of the unary & operand, hence the transformation shouldn't apply to this case, however, all implementations accept this example.
Suggested Resolution
We may want to say
When an id-expression ([expr.prim.id]) that is neither:
part of a class member access syntax ([expr.ref]), nor
the unparenthesized operand of the unary & operator ([expr.unary.op]) if the id-expression is an qualified-id
Full name of submitter (unless configured in github; will be published with the issue): Jim X
[class.mfct.non.static] p2 says:
Consider this case:
According to [class.mfct.non.static] p2, id-expression
a
(especially, unqualified-id) is the operand of the unary&
operand, hence the transformation shouldn't apply to this case, however, all implementations accept this example.Suggested Resolution
We may want to say