Skip to content

Commit 73dcbe2

Browse files
eisenwavetkoeppe
authored andcommitted
CWG3081 Require glvalue when splicing direct base class relationship
Fixes NB US 29-062 (C++26 CD).
1 parent ae227c7 commit 73dcbe2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

source/basic.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4810,7 +4810,9 @@
48104810
\item
48114811
a class member access\iref{expr.ref} using the \tcode{.} operator
48124812
where the left operand is one of these expressions and
4813-
the right operand designates a non-static data member of non-reference type,
4813+
the right operand designates
4814+
a non-static data member\iref{class.mem.general} of non-reference type or
4815+
a direct base class relationship\iref{class.derived.general},
48144816
\item
48154817
a pointer-to-member operation\iref{expr.mptr.oper} using the \tcode{.*} operator
48164818
where the left operand is one of these expressions and

source/expressions.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4173,7 +4173,9 @@
41734173
For a dot that is followed by an expression
41744174
that designates a static member or an enumerator,
41754175
the first expression is a discarded-value expression\iref{expr.context};
4176-
if the expression after the dot designates a non-static data member,
4176+
if the expression after the dot designates a
4177+
non-static data member\iref{class.mem.general} or
4178+
a direct base class relationship\iref{class.derived.general},
41774179
the first expression shall be a glvalue.
41784180
A postfix expression that is followed by an arrow
41794181
shall be a prvalue having pointer type.

0 commit comments

Comments
 (0)