http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58053
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Copied from bug 14281: [class.friend]/2 in the C++ 1998 Standard, which says: "Also, because the base-clause of the friend class is not part of its member declarations, the base-clause of the friend class cannot access the names of the private and protected members from the class granting friendship." So this is invalid code unless this changed for C++11 or C++14.