Commit a8a3f32d by Jason Merrill Committed by Jason Merrill

PR c++/84015 - ICE with class deduction and auto template parm.

	* pt.c (rewrite_template_parm): Use tf_partial in first tsubst.

From-SVN: r257979
parent 9445efc2
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
......
......@@ -25596,7 +25596,7 @@ rewrite_template_parm (tree olddecl, unsigned index, unsigned level,
// 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 ();
......
// 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);
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