tmp/tmpknzw5k0k/{from.md → to.md}
RENAMED
|
@@ -3,10 +3,12 @@
|
|
| 3 |
A nested class is a member and as such has the same access rights as any
|
| 4 |
other member. The members of an enclosing class have no special access
|
| 5 |
to members of a nested class; the usual access rules (Clause
|
| 6 |
[[class.access]]) shall be obeyed.
|
| 7 |
|
|
|
|
|
|
|
| 8 |
``` cpp
|
| 9 |
class E {
|
| 10 |
int x;
|
| 11 |
class B { };
|
| 12 |
|
|
@@ -22,22 +24,27 @@ class E {
|
|
| 22 |
return p->y; // error: I::y is private
|
| 23 |
}
|
| 24 |
};
|
| 25 |
```
|
| 26 |
|
|
|
|
|
|
|
| 27 |
<!-- Link reference definitions -->
|
|
|
|
| 28 |
[basic.def.odr]: basic.md#basic.def.odr
|
| 29 |
[basic.fundamental]: basic.md#basic.fundamental
|
|
|
|
| 30 |
[basic.link]: basic.md#basic.link
|
| 31 |
[basic.lookup]: basic.md#basic.lookup
|
| 32 |
[basic.lookup.elab]: basic.md#basic.lookup.elab
|
| 33 |
[basic.lookup.qual]: basic.md#basic.lookup.qual
|
| 34 |
[basic.lookup.unqual]: basic.md#basic.lookup.unqual
|
| 35 |
[basic.scope]: basic.md#basic.scope
|
| 36 |
[basic.scope.class]: basic.md#basic.scope.class
|
| 37 |
[basic.scope.hiding]: basic.md#basic.scope.hiding
|
| 38 |
-
[basic.start.
|
|
|
|
| 39 |
[basic.start.term]: basic.md#basic.start.term
|
| 40 |
[basic.stc]: basic.md#basic.stc
|
| 41 |
[basic.types]: basic.md#basic.types
|
| 42 |
[c.strings]: strings.md#c.strings
|
| 43 |
[class]: #class
|
|
@@ -54,11 +61,10 @@ class E {
|
|
| 54 |
[class.ctor]: special.md#class.ctor
|
| 55 |
[class.derived]: #class.derived
|
| 56 |
[class.dtor]: special.md#class.dtor
|
| 57 |
[class.free]: special.md#class.free
|
| 58 |
[class.friend]: #class.friend
|
| 59 |
-
[class.inhctor]: special.md#class.inhctor
|
| 60 |
[class.local]: #class.local
|
| 61 |
[class.mem]: #class.mem
|
| 62 |
[class.member.lookup]: #class.member.lookup
|
| 63 |
[class.mfct]: #class.mfct
|
| 64 |
[class.mfct.non-static]: #class.mfct.non-static
|
|
@@ -71,10 +77,11 @@ class E {
|
|
| 71 |
[class.static]: #class.static
|
| 72 |
[class.static.data]: #class.static.data
|
| 73 |
[class.static.mfct]: #class.static.mfct
|
| 74 |
[class.this]: #class.this
|
| 75 |
[class.union]: #class.union
|
|
|
|
| 76 |
[class.virtual]: #class.virtual
|
| 77 |
[conv.mem]: conv.md#conv.mem
|
| 78 |
[conv.ptr]: conv.md#conv.ptr
|
| 79 |
[dcl.enum]: dcl.md#dcl.enum
|
| 80 |
[dcl.fct]: dcl.md#dcl.fct
|
|
@@ -82,22 +89,29 @@ class E {
|
|
| 82 |
[dcl.fct.def.delete]: dcl.md#dcl.fct.def.delete
|
| 83 |
[dcl.fct.default]: dcl.md#dcl.fct.default
|
| 84 |
[dcl.fct.spec]: dcl.md#dcl.fct.spec
|
| 85 |
[dcl.init.aggr]: dcl.md#dcl.init.aggr
|
| 86 |
[dcl.init.ref]: dcl.md#dcl.init.ref
|
|
|
|
| 87 |
[dcl.stc]: dcl.md#dcl.stc
|
| 88 |
[dcl.type.cv]: dcl.md#dcl.type.cv
|
| 89 |
[dcl.type.elab]: dcl.md#dcl.type.elab
|
| 90 |
[dcl.typedef]: dcl.md#dcl.typedef
|
|
|
|
|
|
|
| 91 |
[expr.call]: expr.md#expr.call
|
| 92 |
[expr.cast]: expr.md#expr.cast
|
| 93 |
[expr.const]: expr.md#expr.const
|
| 94 |
[expr.eq]: expr.md#expr.eq
|
| 95 |
[expr.prim]: expr.md#expr.prim
|
| 96 |
-
[expr.prim.
|
| 97 |
[expr.ref]: expr.md#expr.ref
|
|
|
|
| 98 |
[expr.unary.op]: expr.md#expr.unary.op
|
|
|
|
|
|
|
|
|
|
| 99 |
[intro.object]: intro.md#intro.object
|
| 100 |
[namespace.def]: dcl.md#namespace.def
|
| 101 |
[namespace.udecl]: dcl.md#namespace.udecl
|
| 102 |
[over]: over.md#over
|
| 103 |
[over.ass]: over.md#over.ass
|
|
@@ -107,12 +121,14 @@ class E {
|
|
| 107 |
[over.match.funcs]: over.md#over.match.funcs
|
| 108 |
[over.oper]: over.md#over.oper
|
| 109 |
[string.classes]: strings.md#string.classes
|
| 110 |
[temp]: temp.md#temp
|
| 111 |
[temp.arg]: temp.md#temp.arg
|
|
|
|
| 112 |
[temp.friend]: temp.md#temp.friend
|
| 113 |
[temp.inst]: temp.md#temp.inst
|
|
|
|
| 114 |
[temp.param]: temp.md#temp.param
|
| 115 |
[temp.spec]: temp.md#temp.spec
|
| 116 |
[temp.variadic]: temp.md#temp.variadic
|
| 117 |
|
| 118 |
[^1]: Base class subobjects are not so constrained.
|
|
|
|
| 3 |
A nested class is a member and as such has the same access rights as any
|
| 4 |
other member. The members of an enclosing class have no special access
|
| 5 |
to members of a nested class; the usual access rules (Clause
|
| 6 |
[[class.access]]) shall be obeyed.
|
| 7 |
|
| 8 |
+
[*Example 1*:
|
| 9 |
+
|
| 10 |
``` cpp
|
| 11 |
class E {
|
| 12 |
int x;
|
| 13 |
class B { };
|
| 14 |
|
|
|
|
| 24 |
return p->y; // error: I::y is private
|
| 25 |
}
|
| 26 |
};
|
| 27 |
```
|
| 28 |
|
| 29 |
+
— *end example*]
|
| 30 |
+
|
| 31 |
<!-- Link reference definitions -->
|
| 32 |
+
[basic.compound]: basic.md#basic.compound
|
| 33 |
[basic.def.odr]: basic.md#basic.def.odr
|
| 34 |
[basic.fundamental]: basic.md#basic.fundamental
|
| 35 |
+
[basic.life]: basic.md#basic.life
|
| 36 |
[basic.link]: basic.md#basic.link
|
| 37 |
[basic.lookup]: basic.md#basic.lookup
|
| 38 |
[basic.lookup.elab]: basic.md#basic.lookup.elab
|
| 39 |
[basic.lookup.qual]: basic.md#basic.lookup.qual
|
| 40 |
[basic.lookup.unqual]: basic.md#basic.lookup.unqual
|
| 41 |
[basic.scope]: basic.md#basic.scope
|
| 42 |
[basic.scope.class]: basic.md#basic.scope.class
|
| 43 |
[basic.scope.hiding]: basic.md#basic.scope.hiding
|
| 44 |
+
[basic.start.dynamic]: basic.md#basic.start.dynamic
|
| 45 |
+
[basic.start.static]: basic.md#basic.start.static
|
| 46 |
[basic.start.term]: basic.md#basic.start.term
|
| 47 |
[basic.stc]: basic.md#basic.stc
|
| 48 |
[basic.types]: basic.md#basic.types
|
| 49 |
[c.strings]: strings.md#c.strings
|
| 50 |
[class]: #class
|
|
|
|
| 61 |
[class.ctor]: special.md#class.ctor
|
| 62 |
[class.derived]: #class.derived
|
| 63 |
[class.dtor]: special.md#class.dtor
|
| 64 |
[class.free]: special.md#class.free
|
| 65 |
[class.friend]: #class.friend
|
|
|
|
| 66 |
[class.local]: #class.local
|
| 67 |
[class.mem]: #class.mem
|
| 68 |
[class.member.lookup]: #class.member.lookup
|
| 69 |
[class.mfct]: #class.mfct
|
| 70 |
[class.mfct.non-static]: #class.mfct.non-static
|
|
|
|
| 77 |
[class.static]: #class.static
|
| 78 |
[class.static.data]: #class.static.data
|
| 79 |
[class.static.mfct]: #class.static.mfct
|
| 80 |
[class.this]: #class.this
|
| 81 |
[class.union]: #class.union
|
| 82 |
+
[class.union.anon]: #class.union.anon
|
| 83 |
[class.virtual]: #class.virtual
|
| 84 |
[conv.mem]: conv.md#conv.mem
|
| 85 |
[conv.ptr]: conv.md#conv.ptr
|
| 86 |
[dcl.enum]: dcl.md#dcl.enum
|
| 87 |
[dcl.fct]: dcl.md#dcl.fct
|
|
|
|
| 89 |
[dcl.fct.def.delete]: dcl.md#dcl.fct.def.delete
|
| 90 |
[dcl.fct.default]: dcl.md#dcl.fct.default
|
| 91 |
[dcl.fct.spec]: dcl.md#dcl.fct.spec
|
| 92 |
[dcl.init.aggr]: dcl.md#dcl.init.aggr
|
| 93 |
[dcl.init.ref]: dcl.md#dcl.init.ref
|
| 94 |
+
[dcl.inline]: dcl.md#dcl.inline
|
| 95 |
[dcl.stc]: dcl.md#dcl.stc
|
| 96 |
[dcl.type.cv]: dcl.md#dcl.type.cv
|
| 97 |
[dcl.type.elab]: dcl.md#dcl.type.elab
|
| 98 |
[dcl.typedef]: dcl.md#dcl.typedef
|
| 99 |
+
[depr.static_constexpr]: future.md#depr.static_constexpr
|
| 100 |
+
[expr.ass]: expr.md#expr.ass
|
| 101 |
[expr.call]: expr.md#expr.call
|
| 102 |
[expr.cast]: expr.md#expr.cast
|
| 103 |
[expr.const]: expr.md#expr.const
|
| 104 |
[expr.eq]: expr.md#expr.eq
|
| 105 |
[expr.prim]: expr.md#expr.prim
|
| 106 |
+
[expr.prim.this]: expr.md#expr.prim.this
|
| 107 |
[expr.ref]: expr.md#expr.ref
|
| 108 |
+
[expr.static.cast]: expr.md#expr.static.cast
|
| 109 |
[expr.unary.op]: expr.md#expr.unary.op
|
| 110 |
+
[fig:nonvirt]: #fig:nonvirt
|
| 111 |
+
[fig:virt]: #fig:virt
|
| 112 |
+
[fig:virtnonvirt]: #fig:virtnonvirt
|
| 113 |
[intro.object]: intro.md#intro.object
|
| 114 |
[namespace.def]: dcl.md#namespace.def
|
| 115 |
[namespace.udecl]: dcl.md#namespace.udecl
|
| 116 |
[over]: over.md#over
|
| 117 |
[over.ass]: over.md#over.ass
|
|
|
|
| 121 |
[over.match.funcs]: over.md#over.match.funcs
|
| 122 |
[over.oper]: over.md#over.oper
|
| 123 |
[string.classes]: strings.md#string.classes
|
| 124 |
[temp]: temp.md#temp
|
| 125 |
[temp.arg]: temp.md#temp.arg
|
| 126 |
+
[temp.dep.type]: temp.md#temp.dep.type
|
| 127 |
[temp.friend]: temp.md#temp.friend
|
| 128 |
[temp.inst]: temp.md#temp.inst
|
| 129 |
+
[temp.mem]: temp.md#temp.mem
|
| 130 |
[temp.param]: temp.md#temp.param
|
| 131 |
[temp.spec]: temp.md#temp.spec
|
| 132 |
[temp.variadic]: temp.md#temp.variadic
|
| 133 |
|
| 134 |
[^1]: Base class subobjects are not so constrained.
|