re PR c++/59480 (Missing error diagnostic: friend declaration specifying a default...
[official-gcc.git] / gcc / testsuite / g++.dg / other / friend12.C
blobb78ce4b078c4e87e8b40cbda93c463dea208cbc4
1 // PR c++/59480
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 };
11 template class test<bool>;