2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / parse / ambig3.C
blob72ee960c95e4a731a5650661157da41eb47b1574
1 // PR c++/9452
2 // Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
3 // { dg-do compile }
5 template <int> struct A { static const int i = 1; };
6 template <int> struct B {};
8 template <typename> void foo(B<0>) {} // { dg-error "" }
10 template <typename, int j> B<A<j>::i-1> foo(B<j>) { return B<0>(); } // { dg-error "" }
12 void bar() { foo<int>(B<0>()); } // { dg-error "ambiguous" }