[Bug c++/17122] Unable to compile friend operator within template
ron at vaniwaarden dot org
gcc-bugzilla@gcc.gnu.org
Fri Aug 20 16:35:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list