[Bug c++/58022] [4.8 Regression] Compiler rejects abstract class in template class with friend operator<<
scovich at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jul 29 20:30:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58022
--- Comment #3 from Ryan Johnson <scovich at gmail dot com> ---
(In reply to Paolo Carlini from comment #1)
> Please try to reduce the testcase further, no includes. You have a number of
> options here: http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
Sorry, I thought <ostream> was an important part of the bug and did some work
to put it back in... Here's the fully reduced case:
// <<<--- begin bug.cpp --->>>
template<typename _CharT>
class basic_ostream;
typedef basic_ostream<char> ostream;
template<typename T>
basic_ostream<T>& operator<<(basic_ostream<T>&, T);
template <class T> class foo;
template <class T> ostream & operator<<(ostream&, const foo<T>&);
template <class T> class foo {
friend ostream& operator<< <T> (ostream&, const foo<T>&);
};
class bar;
foo<bar> fb;
class bar { virtual void baz()=0; };
// <<<--- end bug.cpp --->>>
More information about the Gcc-bugs
mailing list