Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/friend3.C

raw
1 // { dg-do assemble }
2
3 class foo {
4 public:
5 class bar;
6 void func(bar *);
7 class bar {
8 int st;
9 friend void foo::func(bar *);
10 };
11 };
12
13
14 void foo::func(bar *obj) {
15 obj->st++;
16 }
17
18 void test02() {
19 foo obj_f;
20 foo::bar obj_b;
21
22 obj_f.func( &obj_b);
23 }