Commit 258195f1 by Jason Merrill Committed by Jason Merrill

A non-type template parm with a placeholder type is type-dependent.

	* pt.c (type_dependent_expression_p): A non-type template parm with
	a placeholder type is type-dependent.

From-SVN: r270984
parent 76ddb9eb
2019-05-07 Jason Merrill <jason@redhat.com>
* pt.c (type_dependent_expression_p): A non-type template parm with
a placeholder type is type-dependent.
2019-05-06 Marek Polacek <polacek@redhat.com>
PR c++/90265 - ICE with generic lambda.
......
......@@ -25981,6 +25981,13 @@ type_dependent_expression_p (tree expression)
return false;
}
/* The type of a non-type template parm declared with a placeholder type
depends on the corresponding template argument, even though
placeholders are not normally considered dependent. */
if (TREE_CODE (expression) == TEMPLATE_PARM_INDEX
&& is_auto (TREE_TYPE (expression)))
return true;
gcc_assert (TREE_CODE (expression) != TYPE_DECL);
/* Dependent type attributes might not have made it from the decl to
......
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