This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17122] Unable to compile friend operator within template


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]