This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Testcase for fixed c++/53


Applied.

Neil.

	* g++.dg/template/friend11.C: New test.

Index: template/friend11.C
===================================================================
RCS file: template/friend11.C
diff -N template/friend11.C
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ template/friend11.C	1 Jan 2003 00:25:41 -0000
@@ -0,0 +1,18 @@
+/* PR c++/53 */
+/* { dg-do compile } */
+
+template <class T> 
+struct A {
+  template <class U> class B;
+
+  //  Did not compile with gcc-2.95.2 (linux i686)  :-( 
+  template <class S> template <class U> friend class A<S>::B; 
+};
+
+template <class S> template <class U> class A<S>::B {
+}; 
+
+int main(){
+  A<double>::B<double>  ab;
+  return 0; 
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]