c++/765: Friend function can not have same name of a memeber function
neil@gcc.gnu.org
neil@gcc.gnu.org
Wed Jan 1 16:05:00 GMT 2003
Synopsis: Friend function can not have same name of a memeber function
State-Changed-From-To: analyzed->closed
State-Changed-By: neil
State-Changed-When: Wed Jan 1 08:05:33 2003
State-Changed-Why:
This is fixed in 3.4; it gives the following correct diagnosis:
/tmp/6807.ii:19: error: declaration of `operator-' as non-function
/tmp/6807.ii:19: error: expected function-definition
/tmp/6807.ii: In function `TForwardDeclarationBug<T> operator-(const
TForwardDeclarationBug<T>&, const TForwardDeclarationBug<T>&) [with T = int]
':
/tmp/6807.ii:34: instantiated from here
/tmp/6807.ii:5: error: `int TForwardDeclarationBug<int>::a_' is private
/tmp/6807.ii:28: error: within this context
/tmp/6807.ii:5: error: `int TForwardDeclarationBug<int>::a_' is private
/tmp/6807.ii:28: error: within this context
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=765
More information about the Gcc-bugs
mailing list