PR c++/102300
PR c++/41723
The patch for PR41723 caused PR102300 on trunk; let's just back it out on
the 10 branch.
This reverts commit
e41d610696b81e72d1d06db176b281424e32fc23.
gcc/testsuite/ChangeLog:
* g++.dg/template/nested7.C: New test.
/* Any name names a type if we're following the `typename' keyword
in a qualified name where the enclosing scope is type-dependent. */
typename_p = (typename_keyword_p && scope && TYPE_P (scope)
- && dependent_scope_p (scope));
+ && dependent_type_p (scope));
/* Handle the common case (an identifier, but not a template-id)
efficiently. */
if (token->type == CPP_NAME
+++ /dev/null
-// PR c++/41723
-
-template<class T>
-class C {
- template <class U> class D {};
-
- friend class C::D<int>;
-};
--- /dev/null
+// PR c++/102300
+
+template<typename T>
+struct holder
+{
+ template<typename F> struct fn {};
+
+ struct t1 : fn<T> {}; // pass
+ struct t2 : holder<T >::fn<T> {}; // fail
+ struct t3 : holder<T >::template fn<T> {}; // fail
+ struct t4 : holder<T*>::template fn<T> {}; // pass
+};