aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/parse/ambig3.C
blob: 41390710f803af6466eb3e5e2e8c6b01b2b38db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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>());
}