This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-10-11
In a class member access, if the second expression represents a direct base class relationship, the first expression should be required to be a glvalue.
Possible resolution (reviewed by CWG 2025-10-10) [SUPERSEDED]:
Change in 7.6.1.5 [expr.ref] paragraph 2 as follows:
For a dot that is followed by an expression that designates a static member (11.4.9.3 [class.static.data]) or an enumerator (9.8.1 [dcl.enum]), the first expression is a discarded-value expression (7.2.3 [expr.context]); if the expression after the dot designates a non-static data member (11.4.1 [class.mem.general]) or a direct base class relationship (11.7.1 [class.derived.general], the first expression shall be a glvalue. A postfix expression that is followed by an arrow shall be a prvalue having pointer type.
Proposed resolution:
Change in 6.8.7 [class.temporary] bullet 6.4 as follows:
- ...
- a class member access (7.6.1.5 [expr.ref]) using the . operator where the left operand is one of these expressions and the right operand designates a non-static data member (11.4.1 [class.mem.general]) of non-reference type or a direct base class relationship (11.7.1 [class.derived.general]),
- ...
Change in 7.6.1.5 [expr.ref] paragraph 2 as follows:
For a dot that is followed by an expression that designates a static member or an enumerator, the first expression is a discarded-value expression (7.2.3 [expr.context]); if the expression after the dot designates a non-static data member (11.4.1 [class.mem.general]) or a direct base class relationship (11.7.1 [class.derived.general], the first expression shall be a glvalue. A postfix expression that is followed by an arrow shall be a prvalue having pointer type.