view gcc/testsuite/g++.dg/template/friend55.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/59956

template <int I> struct A;
template <int I> class B {
  int i;
  template <int A_S> friend void A<A_S>::impl();
};

B<0> b1;
template<int I>struct A { void impl(); };
B<1> b2;

template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }

int main()
{
  A<0>().impl();
}