This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38005] inconsistent precedence of operators in namespaces
- From: "c dot hite at rtsgroup dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Nov 2008 13:36:55 -0000
- Subject: [Bug c++/38005] inconsistent precedence of operators in namespaces
- References: <bug-38005-16902@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from c dot hite at rtsgroup dot net 2008-11-04 13:36 -------
If it stopped at the first match, then the call in C would match the operator
in C and say the operands don't match and not compile. Instead C goes on to
call an operator defined in A.
Why does C check A and not the global space first?
Why does D do it the other way around?
Note that if we were talking about functions there is no way C or D could call
anything in A without a using clause or explicit "A::". Operators do a Koenig
lookup, which is a bit different. I think there's something buggy about it.
--
c dot hite at rtsgroup dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38005