This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58054] 11.3 Friends, example from standard not compiled
- From: "dushistov at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Aug 2013 07:04:49 +0000
- Subject: [Bug c++/58054] 11.3 Friends, example from standard not compiled
- Auto-submitted: auto-generated
- References: <bug-58054-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58054
--- Comment #2 from Evgeniy Dushistov <dushistov at mail dot ru> ---
Yes, for C++ 2003 this is invalid code(page 212):
class A {
class B { };
friend class X;
};
class X : A::B { // ill-formed: A::B cannot be accessed
// in the base-clause for X
A::B mx; // OK: A::B used to declare member of X
class Y : A::B { // OK: A::B used to declare member of X
A::B my; // ill-formed: A::B cannot be accessed
// to declare members of nested class of X
};
};
but for 2011 they looks like change behaviour.