Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / g++.dg / template / ttp25.C
blob89153037913cae849953c5fdcec718e600d96f90
1 // { dg-do compile }
2 template<typename T, template<T> class C>
3 void f1(T, C<5>);
5 template<typename T, template<T> class C>
6 void f2(C<5>, T);
8 template<typename T, template<T> class C>
9 void f3(C<5>, T);
11 template<typename T> struct metafun { typedef T type; };
13 template<> struct metafun<short> { typedef int type; };
15 template<typename T, template<typename metafun<T>::type> class C>
16 void f4(T, C<5>);
18 template<int N> struct X {};
19 void g() {
20   f1(5l, X<5>()); // { dg-error "no matching" }
21   f2(X<5>(), 5);
22   f3(X<5>(), 5l); // { dg-error "no matching" }
23   f4(5, X<5>());
24   f4(5l, X<5>()); // { dg-error "no matching" }
25   f4((short)5, X<5>());