diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2013-07-30 09:28:23 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2013-07-30 09:28:23 -0400 |
commit | 1b798a0fe160162efebffb974ebb67ed2456466a (patch) | |
tree | 6dc586f1c3872d02943fe5fceddd57dfe534e6c7 | |
parent | a6dc77bc3d174d5f2cd7e81a5fbc9e96713eb19b (diff) | |
download | gcc-1b798a0fe160162efebffb974ebb67ed2456466a.zip gcc-1b798a0fe160162efebffb974ebb67ed2456466a.tar.gz gcc-1b798a0fe160162efebffb974ebb67ed2456466a.tar.bz2 |
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
-rw-r--r-- | gcc/testsuite/g++.dg/template/abstract1.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/abstract1.C b/gcc/testsuite/g++.dg/template/abstract1.C new file mode 100644 index 0000000..20bbf5a --- /dev/null +++ b/gcc/testsuite/g++.dg/template/abstract1.C @@ -0,0 +1,12 @@ +// PR c++/58022 + +template <class T> struct A { }; +template <class T> A<T> & operator<< (A<T>&, T); +template <class T> class foo; +template <class T> A<char> & operator<<(A<char>& o, const foo<T>& l); +template <class T> class foo { + friend A<char>& operator<< <T> (A<char>& o, const foo<T>& l); +}; +class bar; +foo<bar> fb; +class bar { virtual void baz()=0; }; |