http://llvm.org/bugs/show_bug.cgi?id=11758
Bug #: 11758
Summary: declarations made visible by using-directive are
hidden by namespace members during unqualified name
lookup
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
namespace N
{
void f();
void g();
void h();
namespace { void f(int) { } }
namespace unique { }
using namespace unique;
namespace unique { void g(int) { } }
}
void N::h() {
f(1);
g(1);
}
c.cc:16:3: error: no matching function for call to 'f'
f(1);
^
c.cc:3:8: note: candidate function not viable: requires 0 arguments, but 1 was
provided
void f();
^
c.cc:17:3: error: no matching function for call to 'g'
g(1);
^
c.cc:4:8: note: candidate function not viable: requires 0 arguments, but 1 was
provided
void g();
^
2 errors generated.
The using-directive should mean unique::g is considered a member of N for the
purposes of unqualified name lookup, [basic.lookup.unqual]/2.
The unnamed namespace should behave the same, [namespace.unnamed]/1.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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