https://llvm.org/bugs/show_bug.cgi?id=24264
Bug ID: 24264
Summary: Name hiding in the same declarative region fails when
done via using-directive
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Consider the following well-formed program:
namespace N { struct x {}; }
using namespace N;
int x;
int main() { sizeof (x); }
Compile it with the following command line:
clang++ prog.cc -std=c++98 -pedantic-errors
Observe that error messages about name lookup ambiguity are given. I expect to
get no errors when compiling since the program is well-formed.
That the program is well-formed can be seen by applying both [namespace.udir]/2
and [basic.scope.hiding]/2:
http://eel.is/c++draft/dcl.dcl#namespace.udir-2
http://eel.is/c++draft/basic.scope.hiding#2
This seems reasonable also, so I don't think this is a defect of the c++
standard.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs