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++/52647] Method from global namespace not selected in anonymous namespace when an overload of said method already exists in the anonymous namespace


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.


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