Skip to content

Commit 1ceaafe

Browse files
committed
CWG3081 Require glvalue when splicing direct base class relationship
1 parent 35d632b commit 1ceaafe

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
@@ -4819,7 +4819,9 @@
48194819
\item
48204820
a class member access\iref{expr.ref} using the \tcode{.} operator
48214821
where the left operand is one of these expressions and
4822-
the right operand designates a non-static data member of non-reference type,
4822+
the right operand designates
4823+
a non-static data member\iref{class.mem.general} of non-reference type or
4824+
a direct base class relationship\iref{class.derived.general},
48234825
\item
48244826
a pointer-to-member operation\iref{expr.mptr.oper} using the \tcode{.*} operator
48254827
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
@@ -4172,7 +4172,9 @@
41724172
For a dot that is followed by an expression
41734173
that designates a static member or an enumerator,
41744174
the first expression is a discarded-value expression\iref{expr.context};
4175-
if the expression after the dot designates a non-static data member,
4175+
if the expression after the dot designates a
4176+
non-static data member\iref{class.mem.general} or
4177+
a direct base class relationship\iref{class.derived.general},
41764178
the first expression shall be a glvalue.
41774179
A postfix expression that is followed by an arrow
41784180
shall be a prvalue having pointer type.

0 commit comments

Comments
 (0)