1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// Build don't link: // prms-id: 8785 class Outer { private: int x; // ERROR - private public: struct Inner { int y; void f( Outer * p, int i) { p->x = i; // ERROR - }; void f( Outer & p) { p.x = y; // ERROR - }; }; }; int main() { Outer::Inner A; Outer Thing; A.f(Thing); A.f(&Thing,2); }