view gcc/testsuite/g++.dg/template/pr71406.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// { dg-do compile }
// PR c++/71406 ICE with X::template Name

template < typename T >
struct C : T
{
  void foo () { this->C::template bar <>; }
};

template < typename T >
struct A
{ 
  template < void (T::*Fn) () > void f () {}
};

template < typename T > struct B : A < B < T > >
{ 
  void g ()
  { 
    this->B::template f < &B < T >::g > ();
  }
};

void Foo ()
{ 
  B < int > b;
  b.g ();
}