@@ -21183,7 +21183,7 @@ static bool
deducible_expression (tree expr)
{
/* Strip implicit conversions. */
- while (CONVERT_EXPR_P (expr))
+ while (CONVERT_EXPR_P (expr) || TREE_CODE (expr) == VIEW_CONVERT_EXPR)
expr = TREE_OPERAND (expr, 0);
return (TREE_CODE (expr) == TEMPLATE_PARM_INDEX);
}
new file mode 100644
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++2a } }
+
+struct p { unsigned p_ {}; };
+
+template <p i> struct pp {};
+struct qq : public pp <p {}> {};
+
+template <p i> int f (pp <i> const &);
+
+int main ()
+{
+ return f (qq {});
+}