Date: Wed, 11 Aug 1999 11:54:39 +0400 (MSD) Original-Message-ID: <Pine.LNX.3.96.990811115248.4976D-100000@gams.ihep.su> Dear gcc developers! The code (see below) compiles fine with egcs-1.1.2 and does not compile with gcc-2.95. I get error message: bug1.c: In instantiation of `A<int,6>': bug1.c:15: instantiated from here bug1.c:8: template-id `operator <<<>' for `operator <<(ostream &, const A<int,6> &)' does not match any template declaration bug1.c: In function `int main()': bug1.c:16: no match for `_IO_ostream_withassign & << A<int,6> &' ... more lines ... With best wishes, Alexander Zvyagin. // --- CUT HERE --- #include <iostream> template <class T,T n> class A; template <class T,T n> ostream &operator << (ostream &o,const A<T,n> &a); template <class T,T n> class A { friend ostream &operator << <> (ostream &o,const A<T,n> &a); }; template <class T,T n> ostream &operator << (ostream &o,const A<T,n> &a) { return o << __PRETTY_FUNCTION__ << endl; } main(void) { A<int,6> a; cout << a << endl; } // ---- CUT HERE ------ Release: 2.95.2
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed as a bug
From: loewis@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de, nobody@gcc.gnu.org, zvyagin@gams.ihep.su Cc: Subject: Re: c++/32 Date: 9 Mar 2000 07:21:32 -0000 Synopsis: templated friend ostream & operator << State-Changed-From-To: open->analyzed State-Changed-By: loewis State-Changed-When: Wed Mar 8 23:21:32 2000 State-Changed-Why: Confirmed as a bug http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=32&database=gcc
State-Changed-From-To: analyzed->closed State-Changed-Why: appears fixed in CVS 20000907
From: nathan@gcc.gnu.org To: gcc-gnats@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de, nobody@gcc.gnu.org, zvyagin@gams.ihep.su Cc: Subject: Re: c++/32 Date: 7 Sep 2000 12:03:31 -0000 Synopsis: templated friend ostream & operator << State-Changed-From-To: analyzed->closed State-Changed-By: nathan State-Changed-When: Thu Sep 7 05:03:31 2000 State-Changed-Why: appears fixed in CVS 20000907 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=32&database=gcc