* pt.c (unify_pack_expansion): Use PACK_EXPANSION_EXTRA_ARGS.
From-SVN: r249755
2017-06-28 Jason Merrill <jason@redhat.com>
+ PR c++/72801 - ICE with variadic partial specialization
+ * pt.c (unify_pack_expansion): Use PACK_EXPANSION_EXTRA_ARGS.
+
PR c++/55639 - partial specialization with ::template
* parser.c (cp_parser_class_head): Handle ::template.
tree pack, packs = NULL_TREE;
int i, start = TREE_VEC_LENGTH (packed_parms) - 1;
+ /* Add in any args remembered from an earlier partial instantiation. */
+ targs = add_to_template_args (PACK_EXPANSION_EXTRA_ARGS (parm), targs);
+
packed_args = expand_template_argument_pack (packed_args);
int len = TREE_VEC_LENGTH (packed_args);
--- /dev/null
+// PR c++/72801
+// { dg-do compile { target c++11 } }
+
+template < typename, typename > struct A {};
+
+template < typename ... T > struct B
+{
+ template < typename > struct C
+ {
+ static const int a = 0;
+ };
+
+ template < typename R, typename ... S >
+ struct C < R (A < T, S > ...) >
+ {
+ static const int a = 1;
+ };
+};
+
+#define SA(X) static_assert ((X), #X)
+SA(B <>::C<int()>::a == 1);
+