This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17122] Unable to compile friend operator within template
- From: "ron at vaniwaarden dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2004 16:35:06 -0000
- Subject: [Bug c++/17122] Unable to compile friend operator within template
- References: <20040820150438.17122.ron@vaniwaarden.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ron at vaniwaarden dot org 2004-08-20 16:35 -------
(In reply to comment #2)
> Note that this works though:
> friend void ::operator+<>(int, foo);
>
> I think this is correct as Comeau C++ also rejects the code and accepts the above.
Interesting. Well, I learn something every day because if the return type is
int rather than void, the code must be
int friend ::operator+<>(int foo)
and I never knew the 'friend' went anywhere other than at the begining of the
line...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17122