This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47346] New: access control for nested type is ignored in class template
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Jan 2011 15:15:21 +0000
- Subject: [Bug c++/47346] New: access control for nested type is ignored in class template
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47346
Summary: access control for nested type is ignored in class
template
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: redi@gcc.gnu.org
There are several bugs about failure to do access checking for template
parameters and in function templates (PR 40901, PR 41437, PR 45011, PR 45917)
but I don't think this is a dup of any of them
class C
{
struct Private { };
};
template<typename T>
struct exploit1
{
typedef C::Private type;
};
exploit1<int>::type x1; // error
// similarly for base-specifier
template<typename T>
struct exploit2 : C::Private
{
};
exploit2<int> x2; // error