2012-04-16 Jason Merrill <jason@redhat.com>
+ PR c++/52008
+ * pt.c (process_partial_specialization): Complain about a partial
+ specialization with fewer args than primary template parms.
+
PR c++/50830
* pt.c (convert_template_argument): Handle template template
argument packs.
(maintmpl)))))
error ("partial specialization %qT does not specialize any template arguments", type);
+ /* A partial specialization that replaces multiple parameters of the
+ primary template with a pack expansion is less specialized for those
+ parameters. */
+ if (nargs < DECL_NTPARMS (maintmpl))
+ {
+ error ("partial specialization is not more specialized than the "
+ "primary template because it replaces multiple parameters "
+ "with a pack expansion");
+ inform (DECL_SOURCE_LOCATION (maintmpl), "primary template here");
+ return decl;
+ }
+
/* [temp.class.spec]
A partially specialized non-type argument expression shall not
2012-04-16 Jason Merrill <jason@redhat.com>
+ PR c++/52008
+ * g++.dg/cpp0x/variadic130.C: New.
+
PR c++/50830
* g++.dg/cpp0x/variadic129.C: New.
--- /dev/null
+// PR c++/52008
+// { dg-do compile { target c++11 } }
+
+template <int I, typename T, typename... Ts>
+struct A;
+
+template<typename... Ts>
+struct A<0, Ts...>; // { dg-error "not more specialized" }