Re: C++ enums and shadowing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 April 2015 at 16:08, Ulrich Drepper wrote:
> I'm really curious to learn what is right in this case...

This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60994

The C++11 standard clarified the behaviour here, so that the member
variable foo::name should not be a valid lookup result for the
nested-name-qualifier in foo::name::one, because there is no way that
the integer foo::name' can be used as a qualifier.

3.4.3 [basic.lookup.qual] p1:
"If a :: scope resolution operator in a nested-name-specifier is not
preceded by a decltype-specifier, lookup of the name preceding that ::
considers only namespaces, types, and templates whose specializations
are types."




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux