2012-04-16 Jason Merrill <jason@redhat.com>
+ PR c++/50830
+ * pt.c (convert_template_argument): Handle template template
+ argument packs.
+
PR c++/50303
* pt.c (tsubst_pack_expansion): Use tsubst_expr for template
template parameters.
is_tmpl_type =
((TREE_CODE (arg) == TEMPLATE_DECL
&& TREE_CODE (DECL_TEMPLATE_RESULT (arg)) == TYPE_DECL)
+ || (requires_tmpl_type && TREE_CODE (arg) == TYPE_ARGUMENT_PACK)
|| TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM
|| TREE_CODE (arg) == UNBOUND_CLASS_TEMPLATE);
{
if (requires_tmpl_type)
{
- if (TREE_CODE (TREE_TYPE (arg)) == UNBOUND_CLASS_TEMPLATE)
+ if (template_parameter_pack_p (parm) && ARGUMENT_PACK_P (orig_arg))
+ val = orig_arg;
+ else if (TREE_CODE (TREE_TYPE (arg)) == UNBOUND_CLASS_TEMPLATE)
/* The number of argument required is not known yet.
Just accept it for now. */
val = TREE_TYPE (arg);
2012-04-16 Jason Merrill <jason@redhat.com>
+ PR c++/50830
+ * g++.dg/cpp0x/variadic129.C: New.
+
PR c++/50303
* g++.dg/cpp0x/variadic128.C: New.
--- /dev/null
+// PR c++/50830
+// { dg-do compile { target c++11 } }
+
+template<template<class> class...>
+struct list_templates {};
+
+template<class>
+struct aa {};
+
+template<class... T>
+struct test {};
+
+template<template<class> class... F, class T>
+struct test<list_templates<F...>, T>
+{
+ struct inner {};
+};
+
+test<list_templates<aa>, int> a4; // error