1 // PR c++/31446 2 3 template<void> struct A // { dg-error "valid type" } 4 5 { 6 template<int> friend void foo(); 7 }; 8 bar()9 void bar() 10 { 11 foo<0>(); // { dg-error "not declared|primary-expression" } 12 } 13