view gcc/testsuite/g++.dg/parse/ambig3.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// PR c++/9452
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
// { dg-do compile }

template <int> struct A { static const int i = 1; };
template <int> struct B {};

template <typename> int foo(B<0>)
{
  return 0;
} 

template <typename, int j> B<A<j>::i-1> foo(B<j>)
{
  return B<0>();
} 

int main()
{
  return foo<int>(B<0>());
}