PR c++/81899
* pt.c (instantiate_class_template_1):
BOUND_TEMPLATE_TEMPLATE_PARM is never friend-injected.
PR c++/81899
* g++.dg/template/pr81899.C: New.
From-SVN: r251227
+2017-08-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/81899
+ * pt.c (instantiate_class_template_1):
+ BOUND_TEMPLATE_TEMPLATE_PARM is never friend-injected.
+
2017-08-18 David Malcolm <dmalcolm@redhat.com>
PR c++/81514
adjust_processing_template_decl = true;
--processing_template_decl;
}
- else if (!CLASSTYPE_USE_TEMPLATE (friend_type)
+ else if (TREE_CODE (friend_type) != BOUND_TEMPLATE_TEMPLATE_PARM
+ && !CLASSTYPE_USE_TEMPLATE (friend_type)
&& TYPE_HIDDEN_P (friend_type))
{
/* friend class C;
+2017-08-21 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/81899
+ * g++.dg/template/pr81899.C: New.
+
2017-08-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/81900
--- /dev/null
+// PR 81899 we tried to treat a bound-tpl-tpl-parm as-if a real record-type
+
+template <template <typename> class FunctorData>
+struct functor {
+ friend FunctorData<int>;
+ void foo();
+};
+
+template <typename> struct data;
+
+template<> void functor<data>::foo();