http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53102
Bug #: 53102
Summary: Misplaced 'typename' gives access to private type
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Here 'typename' is used outside a template, in which case it apparently
invalidly gives access to A::type.
class A {
private:
typedef int type;
};
class B {
public:
typedef typename A::type type;
};
int main()
{
B::type v = 8;
return v;
}