[Bug c++/52647] Method from global namespace not selected in anonymous namespace when an overload of said method already exists in the anonymous namespace
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 21 03:52:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52647
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-21 01:59:17 UTC ---
This is correct. The behavior can be seen with:
void foo(char) {}
namespace anon { void foo(void*) {} }
using namespace anon;
namespace anon { void bar() { foo('x'); } }
foo in the anon namespace is only foo as ::foo is hidden and char does not have
a namespace associated with it for ADL.
More information about the Gcc-bugs
mailing list