[Bug c++/67010] Name hiding in the same declarative region fails when done via using-directive

anders.granlund.0 at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Jul 26 02:10:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67010

--- Comment #1 from Anders Granlund <anders.granlund.0 at gmail dot com> ---
Detailed explanation of how the c++ standard can be applied to the program:

By [namespace.udir]/2 during the unqualified name lookup of x in sizeof (x),
the declaration struct x {}; appears as if it was declared in the declarative
region of the global namespace, so the name lookup will appear to be affected
by the type of name hiding described in [basic.scope.hiding]/2. Because of this
name hiding we should not get any ambiguity in the name lookup.



More information about the Gcc-bugs mailing list