Debian Codegraph @

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

raw
1 // PR c++/59480
2
3 template<typename>
4 class test {
5 friend int foo(bool = true) { return 1; } // { dg-message "14:previous" }
6 friend int foo(bool); // { dg-error "14:friend declaration" }
7 template<typename> friend int bar(bool = true) { return 1; } // { dg-message "33:previous" }
8 template<typename> friend int bar(bool); // { dg-error "33:friend declaration" }
9 };
10
11 template class test<bool>;