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:
parent
a6dc77bc3d
commit
1b798a0fe1
12
gcc/testsuite/g++.dg/template/abstract1.C
Normal file
12
gcc/testsuite/g++.dg/template/abstract1.C
Normal 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; };
|
Loading…
Reference in New Issue
Block a user