Skip to content

Commit c02bb94

Browse files
[expr.ref][class.access.base] Move pointer convertibility wording
... and discard cv for the left hand side operand.
1 parent 454ba17 commit c02bb94

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

source/classes.tex

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4897,20 +4897,6 @@
48974897
\end{example}
48984898
\end{itemize}
48994899

4900-
\pnum
4901-
If a class member access operator, including an implicit
4902-
``\tcode{this->}'',
4903-
is used to access a non-static data member or non-static
4904-
member function, the reference is ill-formed if the
4905-
left operand (considered as a pointer in the
4906-
``\tcode{.}''
4907-
operator case) cannot be implicitly converted to a
4908-
pointer to the designating class of the right operand.
4909-
\begin{note}
4910-
This requirement is in addition to the requirement that
4911-
the member be accessible as designated.
4912-
\end{note}
4913-
49144900
\rSec2[class.friend]{Friends}%
49154901
\indextext{friend function!access and}%
49164902
\indextext{access control!friend function}

source/expressions.tex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4338,6 +4338,16 @@
43384338
Otherwise, the program is ill-formed.
43394339
\end{itemize}
43404340

4341+
\pnum
4342+
Let \tcode{C} be the cv-unqualified version of the type of \tcode{E1}.
4343+
The program is ill-formed if a prvalue of type ``pointer to \tcode{C}''
4344+
cannot be implicitly converted to a pointer to
4345+
the designating class\iref{class.access.base} of the right operand.
4346+
\begin{note}
4347+
This requirement is in addition to the requirement that
4348+
the member be accessible as designated.
4349+
\end{note}
4350+
43414351
\pnum
43424352
If \tcode{E2} designates a non-static member
43434353
(possibly after overload resolution),

0 commit comments

Comments
 (0)