http://llvm.org/bugs/show_bug.cgi?id=8178
Summary: Clang doesn't accept public member reference that is
private in derived class
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]
The following code is valid according to [class.access.base] paragraph 4 last
bullet.
struct A {
int a;
};
struct B : A {
private:
using A::a;
};
int main() {
B b;
b.a = 0;
}
Clang gives
main1.cpp:12:5: error: 'a' is a private member of 'B'
b.a = 0;
^
main1.cpp:7:12: note: declared private here
using A::a;
^
1 error generated.
I'm not sure whether this is one of the weird access checking scenarious that
clang intentionally doesn't implement.
--
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