This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Internal compiler error
- To: mikes at nilenet dot com
- Subject: Re: Internal compiler error
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sun, 30 Jan 2000 11:29:37 +0100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <3893E092.B6BDDFD8@nilenet.com>
> Please send me feedback on how to get operator<< to work for struct
> Pair.
Thanks for your bug report. Although this is certainly a bug in the
compiler, I believe this is also a bug in your code.
> template<class key,class value>
> template<class key2,class value2>
> ostream& operator<<(ostream& ls, const Pair<key2,value2>& rs)
> {
> ls << rs.k << '\t' << rs.v;
> return ls;
> }
The template arguments key and value are not needed, are they? If you
remove the first line, g++ compiles your code just fine.
Regards,
Martin