// CWG 2235 namespace X { template struct Const { typedef void type; }; template void f(T, typename Const::type*); // T1 template void f(T, void *); // T2 void g(void *p) { f(0, p); } } namespace Y { struct A { A(int); }; struct B { B(int); }; template void f(T, A); template void f(T*, B); void g(int *p) { f(p, 0); } // { dg-error "ambiguous" } }