// RUN: %clang_cc1 -std=c++11 -verify %s template struct X {}; template struct P {}; namespace Nested { template int f1(X... a); // expected-note +{{conflicting types for parameter 'T'}} template int f2(P, T> ...a); // expected-note +{{conflicting types for parameter 'T'}} int a1 = f1(X(), X()); int a2 = f1(X()); int a3 = f1(X(), X()); // expected-error {{no matching}} int a4 = f1(X(), X()); // expected-error {{no matching}} int a5 = f1(X(), X()); // expected-error {{no matching}} int a6 = f1(X(), X(), X()); // expected-error {{no matching}} int b1 = f2(P, int>(), P, double>()); int b2 = f2(P, int>(), P, double>(), P, char>()); // expected-error {{no matching}} } namespace PR14841 { template struct A {}; template void f(A); // expected-note {{substitution failure [with Ts = ]: too many template arg}} void g(A a) { f(a); f(a); f(a); f(a); // expected-error {{no matching function}} } } namespace RetainExprPacks { int f(int a, int b, int c); template struct X {}; template int g(X, decltype(f(Ts()...))); int n = g(X(), 0); }