// PR c++/28111 // { dg-do compile } template void foo(); template struct A { friend void foo<>(typename T::X); // { dg-error "not a class" } }; A a;