* pt.c (tsubst_pack_expansion): Allow unsubstituted auto pack.
From-SVN: r259100
2018-04-04 Jason Merrill <jason@redhat.com>
+ PR c++/85006 - -fconcepts ICE with A<auto...> return type
+ * pt.c (tsubst_pack_expansion): Allow unsubstituted auto pack.
+
PR c++/85200 - ICE with constexpr if in generic lambda.
* tree.c (cp_walk_subtrees): Walk into DECL_EXPR in templates.
/* We can't substitute for this parameter pack. We use a flag as
well as the missing_level counter because function parameter
packs don't have a level. */
- gcc_assert (processing_template_decl);
+ gcc_assert (processing_template_decl || is_auto (parm_pack));
unsubstituted_packs = true;
}
}
--- /dev/null
+// PR c++/85006
+// { dg-additional-options "-std=c++17 -fconcepts" }
+
+template<typename... Ts> struct A {};
+
+template<typename... Us> A<auto...> foo() { return A{}; }
+
+void bar()
+{
+ foo();
+}