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++/50399] [c++11] Lookup error w/ enums


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-15 09:26:38 UTC ---
C++03 says "During the lookup for a name preceding the :: scope resolution
operator, object, function, and enumerator names are ignored."

So in -std=c++98 mode G++ is correct to ignore A::C::B and so finds B::F (Clang
gets this wrong)

In C++11 the enumeration is not ignored (because a nested-name-specifier could
refer to a scoped enumeration) so name lookup finds B in the enclosing
namespace, i.e. A::C::B


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