------- Comment #2 from pinskia at gcc dot gnu dot org  2005-10-31 15:32 -------
No, you cannot get around access checking like this.

b2 does not know anything about its super classes at all, and it should not
know anything about them.

Also the following applies:
b2 cannot access the stuff in another base class of G.
Like:
class b1{protected: int i;}  ;struct G; struct b2 { int f(G *); }; struct G:
b1, b2 {};  int b2::f(G *a){return a->i;}
is invalid as b2 cannot access b1's fields.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24592

Reply via email to