From 1b798a0fe160162efebffb974ebb67ed2456466a Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 30 Jul 2013 09:28:23 -0400 Subject: [PATCH] re PR c++/58022 (Compiler rejects abstract class in template class with friend operator<<) PR c++/58022 * g++.dg/template/abstract1.C: New. From-SVN: r201337 --- gcc/testsuite/g++.dg/template/abstract1.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/abstract1.C diff --git a/gcc/testsuite/g++.dg/template/abstract1.C b/gcc/testsuite/g++.dg/template/abstract1.C new file mode 100644 index 00000000000..20bbf5a911f --- /dev/null +++ b/gcc/testsuite/g++.dg/template/abstract1.C @@ -0,0 +1,12 @@ +// PR c++/58022 + +template struct A { }; +template A & operator<< (A&, T); +template class foo; +template A & operator<<(A& o, const foo& l); +template class foo { + friend A& operator<< (A& o, const foo& l); +}; +class bar; +foo fb; +class bar { virtual void baz()=0; };