[Bug c++/51577] dependent name lookup finds operator in global namespace

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Apr 13 11:52:00 GMT 2013


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-04-13 11:52:51 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > The example in PR 56943 gives a wrong-code example
> 
> Could you explain why? It looks valid to me. According to my understanding, the
> free operator+ overload in global namespace is no valid candidate, but the
> member operator+ of N::A is one.

and G++ calls the global one, returning the wrong result, so it's wrong-code



More information about the Gcc-bugs mailing list