http://llvm.org/bugs/show_bug.cgi?id=15209
Bug ID: 15209
Summary: core DR 580 - template parameters and base-specifiers
access checked too eagerly
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
class A {
typedef int I; // private member
template<int> struct Q;
template<int> friend struct R;
protected:
struct B { };
};
template<A::I> struct A::Q { };
template<A::I> struct R { };
struct D: A::B, A { };
t.cc:9:13: error: 'I' is a private member of 'A'
template<A::I> struct R { };
^
t.cc:2:15: note: implicitly declared private here
typedef int I; // private member
^
t.cc:10:14: error: 'B' is a protected member of 'A'
struct D: A::B, A { };
^
t.cc:6:10: note: declared protected here
struct B { };
^
The member, A::Q, is handled correctly, but the friend R and derived type D
should also be able to refer to non-public names from A.
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#580
--
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