1// PR c++/59956 2 3template <int I> struct A; 4template <int I> class B { 5 int i; 6 template <int A_S> friend void A<A_S>::impl(); 7}; 8 9B<0> b1; 10template<int I>struct A { void impl(); }; 11B<1> b2; 12 13template<int I> void A<I>::impl() { ++b1.i; ++b2.i; } 14 15int main() 16{ 17 A<0>().impl(); 18} 19