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
This commit is contained in:
Jason Merrill 2013-07-30 09:28:23 -04:00
parent a6dc77bc3d
commit 1b798a0fe1

View File

@ -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; };