* pt.c (find_parameter_packs_r): Don't walk into the type of
templates other than template template-parameters.
From-SVN: r245594
2017-02-19 Jason Merrill <jason@redhat.com>
+ PR c++/78282 - auto template and pack expansion
+ * pt.c (find_parameter_packs_r): Don't walk into the type of
+ templates other than template template-parameters.
+
PR c++/79606 - ICE with this->base_member in NSDMI
* class.c (build_base_path): Check processing_template_decl.
*walk_subtrees = 0;
return NULL_TREE;
- case CONSTRUCTOR:
case TEMPLATE_DECL:
+ if (!DECL_TEMPLATE_TEMPLATE_PARM_P (t))
+ return NULL_TREE;
+ gcc_fallthrough();
+
+ case CONSTRUCTOR:
cp_walk_tree (&TREE_TYPE (t),
&find_parameter_packs_r, ppd, ppd->visited);
return NULL_TREE;
--- /dev/null
+// PR c++/78282
+// { dg-do compile { target c++14 } }
+
+struct null_node
+{
+ null_node(const null_node&);
+};
+
+extern null_node null;
+
+template <typename T>
+auto get() { return null; }
+
+template <typename... Ts>
+struct inheritor: Ts...
+{
+ inheritor(const inheritor& outer)
+ : Ts(get<Ts...>())...
+ { }
+};
+
+void test()
+{
+ extern inheritor<null_node> example;
+ inheritor<null_node> result(example);
+}