class A { }; class B: protected A { };
class C: protected A { public: C(B & b); }; C::C(B & b) : A(b) { } int main() { B b; C c(b); return 0; } should give an error for : A(b), the conversion from B to A is invalid as A is protected. This still fails on 4.4.0 20080317 radr://5805511 -- Summary: invalid access to protected base class Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mrs at apple dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35640