This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8827: operator<< within namespace shadows all operator<<'s in global namespace
- From: bangerth at dealii dot org
- To: dhawkins at cdrgts dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 5 Dec 2002 19:57:06 -0000
- Subject: Re: c++/8827: operator<< within namespace shadows all operator<<'s in global namespace
- Reply-to: bangerth at dealii dot org, dhawkins at cdrgts dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: operator<< within namespace shadows all operator<<'s in global namespace
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu Dec 5 11:57:05 2002
State-Changed-Why:
This is not a bug, but how Koenig lookup works. If there
is nothing in the present namespace, then we look into
the namespaces of the arguments of the operator, which
triggers the message.
There are a number of similar reports in the database.
If you know which operator you want to call, then qualify
it with the name of the namespace.
Regards
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8827