commit 364983121fbd1a0c79185a5d0291bcef72970613
Author: Jason Merrill <jason@redhat.com>
Date: Tue Mar 15 12:13:03 2016 -0400
PR c++/70141
* pt.c (for_each_template_parm_r): Always walk into TYPENAME_TYPE.
@@ -8851,8 +8851,9 @@ for_each_template_parm_r (tree *tp, int *walk_subtrees, void *d)
break;
case TYPENAME_TYPE:
- if (!fn)
- WALK_SUBTREE (TYPENAME_TYPE_FULLNAME (t));
+ /* A template-id in a TYPENAME_TYPE might be a deduced context after
+ partial instantiation. */
+ WALK_SUBTREE (TYPENAME_TYPE_FULLNAME (t));
break;
case CONSTRUCTOR:
new file mode 100644
@@ -0,0 +1,26 @@
+// PR c++/70141
+
+template <typename T>
+struct outer
+{
+ template <typename U>
+ struct inner
+ {
+
+ };
+};
+
+
+template <typename T>
+struct is_inner_for
+{
+ template <typename Whatever>
+ struct predicate;
+
+ template <typename U>
+ struct predicate<typename outer<T>::template inner<U> >
+ {
+ };
+};
+
+is_inner_for<int>::predicate<outer<int>::inner<double> > p;