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++/42490] using-directive in namespace doesn't work properly



------- Comment #2 from schaub-johannes at web dot de  2010-02-11 23:28 -------
I also think the code is valid. In this case though, there is the complication
that no hiding takes place: The qualified name lookup of "X::m" for namespace
members says in 3.4.3.2/2: "using-directives are ignored in any namespace,
including X, directly containing one or more declarations of m". That would
mean that "using namespace B;" is ignored, because "C" is declared as a
namespace there. 

But 3.4.4/3 says: "If the name is a qualified-id, the name is looked up
according its qualifications, as described in 3.4.3, but ignoring any non-type
names that have been declared.". That is, the declaration of the namespace is
ignored, thus not preventing the consideration of the using directive. 


-- 


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


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