1 // { dg-do run } 2 // Bug: g++ generates an error trying to generate the first foo<int>, when 3 // it should silently fail and go on to the next one. 4 5 template<class T, typename U> class A { }; 6 7 template<class T> void 8 foo(const A<T,typename T::N>&); 9 10 template<typename T> 11 class B { }; 12 13 template<typename T> void 14 foo(B<T> const &) { } 15 16 int 17 main(void) 18 { 19 B<int> sa; 20 21 foo<int> (sa); 22 } 23