This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug 45775] (c++) New: Private templated classes/structs inside a class.
- From: "liranuna at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Sep 2010 06:48:54 +0000
- Subject: [Bug 45775] (c++) New: Private templated classes/structs inside a class.
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45775
Summary: Private templated classes/structs inside a class.
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: liranuna@gmail.com
Created attachment 21874
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=21874
Failing code
Using GCC 4.4.3, and the attached source code, GCC does not error that the
access to A::B<T> is illegal.
According to the C++ spec:
11.8 Nested classes [class.access.nest]
1 A nested class is a member and as such has the same access rights as any
other member. The members of an enclosing class have no special access to
members of a nested class; the usual access rules (Clause 11) shall be obeyed.
Note that A::C is erroring correctly.
--
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.