c++: Add fixed test [PR96474]

Was happy to find out that my recent dguide fix (r11-7483) fixed
this test too.  In particular, the

+  /* Wait until the enclosing scope is non-dependent.  */
+  if (DECL_CLASS_SCOPE_P (tmpl)
+      && dependent_type_p (DECL_CONTEXT (tmpl)))
+    return ptype;

bit.

gcc/testsuite/ChangeLog:

	PR c++/96474
	* g++.dg/cpp1z/class-deduction83.C: New test.
This commit is contained in:
Marek Polacek 2021-03-03 15:10:21 -05:00
parent 499193a692
commit 49df367b17

View File

@ -0,0 +1,13 @@
// PR c++/96474
// { dg-do compile { target c++17 } }
template <typename = void>
struct A
{
template <typename = void>
struct B
{
};
};
A<>::B b;