Debian Codegraph @

gcc/testsuite/g++.dg/template/partial-order2.C

raw
1 // CWG 2235
2
3 namespace X
4 {
5 template<typename T> struct Const { typedef void type; };
6 template<typename T> void f(T, typename Const<T>::type*); // T1
7 template<typename T> void f(T, void *); // T2
8 void g(void *p) { f(0, p); }
9 }
10
11 namespace Y
12 {
13 struct A { A(int); };
14 struct B { B(int); };
15
16 template<typename T> void f(T, A);
17 template<typename T> void f(T*, B);
18
19 void g(int *p) { f(p, 0); } // { dg-error "ambiguous" }
20 }