A mem-initializer is not a type, and we don't want to turn autos within it
into packs.
* pt.c (make_pack_expansion): Change type_pack_expansion_p to false.
From-SVN: r270111
+2019-04-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/89917 - ICE with lambda in variadic mem-init.
+ * pt.c (make_pack_expansion): Change type_pack_expansion_p to false.
+
2019-04-01 Jason Merrill <jason@redhat.com>
PR c++/86946 - ICE with function call in template argument.
class expansion. */
ppd.visited = new hash_set<tree>;
ppd.parameter_packs = ¶meter_packs;
- ppd.type_pack_expansion_p = true;
+ ppd.type_pack_expansion_p = false;
gcc_assert (TYPE_P (TREE_PURPOSE (arg)));
cp_walk_tree (&TREE_PURPOSE (arg), &find_parameter_packs_r,
&ppd, ppd.visited);
--- /dev/null
+// PR c++/89917
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ A(...);
+};
+
+template<typename... T> struct B : T...
+{
+ B() : T([]{})... {}
+};
+
+B<A> b;