tmp/tmpgti8bgg8/{from.md → to.md}
RENAMED
|
@@ -1,17 +1,19 @@
|
|
| 1 |
### Protected member access <a id="class.protected">[[class.protected]]</a>
|
| 2 |
|
| 3 |
An additional access check beyond those described earlier in
|
| 4 |
[[class.access]] is applied when a non-static data member or non-static
|
| 5 |
member function is a protected member of its naming class
|
| 6 |
-
[[class.access.base]].[^13]
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
[*Example 1*:
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
class B {
|
|
|
|
| 1 |
### Protected member access <a id="class.protected">[[class.protected]]</a>
|
| 2 |
|
| 3 |
An additional access check beyond those described earlier in
|
| 4 |
[[class.access]] is applied when a non-static data member or non-static
|
| 5 |
member function is a protected member of its naming class
|
| 6 |
+
[[class.access.base]].[^13]
|
| 7 |
+
|
| 8 |
+
As described earlier, access to a protected member is granted because
|
| 9 |
+
the reference occurs in a friend or direct member of some class `C`. If
|
| 10 |
+
the access is to form a pointer to member [[expr.unary.op]], the
|
| 11 |
+
*nested-name-specifier* shall denote `C` or a class derived from `C`.
|
| 12 |
+
All other accesses involve a (possibly implicit) object expression
|
| 13 |
+
[[expr.ref]]. In this case, the class of the object expression shall be
|
| 14 |
+
`C` or a class derived from `C`.
|
| 15 |
|
| 16 |
[*Example 1*:
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
class B {
|