[Bug c++/53102] New: Misplaced 'typename' gives access to private type
kristian.spangsege at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Apr 24 11:08:00 GMT 2012
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: unassigned@gcc.gnu.org
ReportedBy: kristian.spangsege@gmail.com
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;
}
More information about the Gcc-bugs
mailing list