penultimate parameter of a template parameter list, where the last parameter is
itself a pack, and build a bogus empty final pack argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221748
91177308-0d34-0410-b5e6-
96231b3b80d8
}
// Push the argument pack onto the list of converted arguments.
- if (InFinalParameterPack) {
+ if (InFinalParameterPack && !ArgumentPack.empty()) {
Converted.push_back(
TemplateArgument::CreatePackCopy(Context,
ArgumentPack.data(),
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
// Template argument deduction with template template parameters.
template<typename T, template<T> class A>
foo(a);
}
}
+
+namespace PR21536 {
+ template<typename ...T> struct X;
+ template<typename A, typename ...B> struct S {
+ static_assert(sizeof...(B) == 1, "");
+ void f() {
+ using T = A;
+ using T = int;
+
+ using U = X<B...>;
+ using U = X<int>;
+ }
+ };
+ template<typename ...T> void f(S<T...>);
+ void g() { f(S<int, int>()); }
+}