tmp/tmpz1elniig/{from.md → to.md}
RENAMED
|
@@ -11,14 +11,14 @@ shall be obeyed.
|
|
| 11 |
class E {
|
| 12 |
int x;
|
| 13 |
class B { };
|
| 14 |
|
| 15 |
class I {
|
| 16 |
-
B b; // OK
|
| 17 |
int y;
|
| 18 |
void f(E* p, int i) {
|
| 19 |
-
p->x = i; // OK
|
| 20 |
}
|
| 21 |
};
|
| 22 |
|
| 23 |
int g(I* p) {
|
| 24 |
return p->y; // error: I::y is private
|
|
|
|
| 11 |
class E {
|
| 12 |
int x;
|
| 13 |
class B { };
|
| 14 |
|
| 15 |
class I {
|
| 16 |
+
B b; // OK, E::I can access E::B
|
| 17 |
int y;
|
| 18 |
void f(E* p, int i) {
|
| 19 |
+
p->x = i; // OK, E::I can access E::x
|
| 20 |
}
|
| 21 |
};
|
| 22 |
|
| 23 |
int g(I* p) {
|
| 24 |
return p->y; // error: I::y is private
|