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++/15625] [3.4/3.5 Regression] friend defined inside a template fails to find static function


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-05-31 18:34 -------
This code is invalid; according to the standard, the friend function should not
be injected into the namespace scope.  (This is a change from the ARM.) 
However, g++ has always done the injection, and we have not yet removed that
functionality, so this code should work as expected.  

The standard-conforming way of doing this is to have a namespace-scope
declaration of the function.  You can still define it in the class, but it
should be declared outside the class.

This comment is meant to answer Wolfgang's question regarding this seems to work
at all.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15625


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