1179185Sjb// { dg-do compile } 2210688Srpaulotemplate<typename T, template<T> class C> 3179185Sjbvoid f1(T, C<5>); // { dg-message "note" } 4179185Sjb 5179185Sjbtemplate<typename T, template<T> class C> 6210688Srpaulovoid f2(C<5>, T); 7210688Srpaulo 8210688Srpaulotemplate<typename T, template<T> class C> 9179185Sjbvoid f3(C<5>, T); // { dg-message "note" } 10179185Sjb 11179185Sjbtemplate<typename T> struct metafun { typedef T type; }; 12179185Sjb 13179185Sjbtemplate<> struct metafun<short> { typedef int type; }; 14179185Sjb 15179185Sjbtemplate<typename T, template<typename metafun<T>::type> class C> 16179185Sjbvoid f4(T, C<5>); // { dg-message "note" } 17179185Sjb 18179185Sjbtemplate<int N> struct X {}; 19179185Sjbvoid g() { 20179185Sjb f1(5l, X<5>()); // { dg-error "no matching" } 21179185Sjb // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 20 } 22179185Sjb f2(X<5>(), 5); 23179185Sjb f3(X<5>(), 5l); // { dg-error "no matching" } 24179185Sjb // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 23 } 25179185Sjb f4(5, X<5>()); 26179185Sjb f4(5l, X<5>()); // { dg-error "no matching" } 27179185Sjb // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } 26 } 28179185Sjb f4((short)5, X<5>()); 29179185Sjb} 30179185Sjb