We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e326276 commit a78f644Copy full SHA for a78f644
source/classes.tex
@@ -4270,6 +4270,19 @@
4270
access control is applied to it, not to the declarations that replace it.
4271
For an overload set, access control is applied only to
4272
the function selected by overload resolution.
4273
+\begin{example}
4274
+\begin{codeblock}
4275
+struct S {
4276
+ void f(int);
4277
+private:
4278
+ void f(double);
4279
+};
4280
+
4281
+void g(S* sp) {
4282
+ sp->f(2); // OK, access control applied after overload resolution
4283
+}
4284
+\end{codeblock}
4285
+\end{example}
4286
\begin{note}
4287
Because access control applies to the declarations named, if access control is applied to a
4288
\grammarterm{typedef-name}, only the accessibility of the typedef or alias declaration itself is considered.
0 commit comments