* pt.c (rewrite_template_parm): Use tf_partial in first tsubst.
From-SVN: r257979
+2018-02-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/84015 - ICE with class deduction and auto template parm.
+ * pt.c (rewrite_template_parm): Use tf_partial in first tsubst.
+
2018-02-24 Marek Polacek <polacek@redhat.com>
PR c++/83692
// Substitute ttargs into ttparms to fix references to
// other template parameters.
ttparms = tsubst_template_parms_level (ttparms, ttargs,
- complain);
+ complain|tf_partial);
// Now substitute again with args based on tparms, to reduce
// the level of the ttparms.
ttargs = current_template_args ();
--- /dev/null
+// PR c++/84015
+// { dg-additional-options -std=c++17 }
+
+template <int I>
+struct A { };
+
+template <int I>
+struct B
+{
+ template<template<auto>class T>
+ B(T<I>);
+};
+
+A<42> a;
+B b (a);