Commit a3379186 by Jason Merrill Committed by Jason Merrill

PR c++/89917 - ICE with lambda in variadic mem-init.

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
parent 38802907
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.
......
......@@ -3933,7 +3933,7 @@ make_pack_expansion (tree arg, tsubst_flags_t complain)
class expansion. */
ppd.visited = new hash_set<tree>;
ppd.parameter_packs = &parameter_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);
......
// PR c++/89917
// { dg-do compile { target c++11 } }
struct A
{
A(...);
};
template<typename... T> struct B : T...
{
B() : T([]{})... {}
};
B<A> b;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment