1// RUN: %clang_cc1 -fsyntax-only -verify %s 2 3template<int i> class A { }; 4template<short s> void f(A<s>); // expected-note{{candidate template ignored: substitution failure}} 5 6void k1() { 7 A<1> a; 8 f(a); // expected-error{{no matching function for call}} 9 f<1>(a); 10} 11template<const short cs> class B { }; 12template<short s> void g(B<s>); 13void k2() { 14 B<1> b; 15 g(b); // OK: cv-qualifiers are ignored on template parameter types 16} 17 18template<short s> void h(int (&)[s]); // expected-note{{candidate function template not viable: requires 1 argument, but 2 were provided}} 19void k3() { 20 int array[5]; 21 h(array); 22 h<5>(array); 23} 24 25template<short s> void h(int (&)[s], A<s>); // expected-note{{candidate template ignored: substitution failure}} 26void k4() { 27 A<5> a; 28 int array[5]; 29 h(array, a); // expected-error{{no matching function for call}} 30 h<5>(array, a); 31} 32