Skip to content

Commit b973550

Browse files
jensmaurerzygoloid
authored andcommitted
[class.this] Member functions are not cv-qualified.
1 parent 3b41755 commit b973550

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/classes.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,9 +1094,10 @@
10941094
non-static data members.
10951095

10961096
\pnum
1097-
A cv-qualified member function can be called on an
1098-
object-expression\iref{expr.ref} only if the object-expression is as
1099-
cv-qualified or less-cv-qualified than the member function.
1097+
A member function whose type has a \grammarterm{cv-qualifier-seq} \cvqual{cv1}
1098+
can be called on an
1099+
object expression\iref{expr.ref} of type \cvqual{cv2} \tcode{T} only
1100+
if \cvqual{cv1} is the same as or more cv-qualified than \cvqual{cv2}\iref{basic.type.qualifier}.
11001101
\begin{example}
11011102
\begin{codeblock}
11021103
void k(s& x, const s& y) {
@@ -1109,7 +1110,7 @@
11091110

11101111
The call \tcode{y.g()} is ill-formed because \tcode{y} is \tcode{const}
11111112
and \tcode{s::g()} is a non-const member function, that is,
1112-
\tcode{s::g()} is less-qualified than the object-expression \tcode{y}.
1113+
\tcode{s::g()} is less-qualified than the object expression \tcode{y}.
11131114
\end{example}
11141115

11151116
\pnum

0 commit comments

Comments
 (0)