Debian Codegraph @

gcc/testsuite/g++.dg/other/friend6.C

raw
1 // PR c++/27100
2 // This used to fail at link time with an "undefined reference to 'foo'" error.
3 // { dg-do run }
4
5 struct A
6 {
7 friend void foo (const A&) { }
8 friend void foo (const A&);
9 };
10
11 int
12 main ()
13 {
14 foo (A ());
15 }