1 2 3 4 5 6 7 8 9 10
// { dg-options "-std=c++0x" } template<int...> struct A { void foo(); }; struct B { template<int N> friend void A<N>::A::foo(); // { dg-error "declared as friend" } };