2015-03-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42328
* g++.dg/template/friend58.C: New.
* g++.dg/template/friend59.C: Likewise.
From-SVN: r221751
+2015-03-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/42328
+ * g++.dg/template/friend58.C: New.
+ * g++.dg/template/friend59.C: Likewise.
+
2015-03-27 Tobias Burnus <burnus@net-b.de>
PR c/65586
--- /dev/null
+// PR c++/42328
+
+template<typename T, typename U>
+class freeList
+{
+public:
+ void foo() {};
+};
+
+class bar {};
+
+class baz : protected freeList<bar, baz>
+{
+ template<typename T>
+ friend
+ void freeList<T, baz>::foo(); // { dg-error "friend" }
+};
+
+baz b;
--- /dev/null
+// PR c++/42328
+
+template<typename T, typename U>
+class freeList
+{
+public:
+ void foo() {};
+};
+
+class bar {};
+
+class baz;
+template<typename T> class freeList<T, baz> { void foo(); };
+
+class baz : protected freeList<bar, baz>
+{
+ template<typename T>
+ friend
+ void freeList<T, baz>::foo();
+};
+
+baz b;