daniel@saturn.ucsc.edu (Daniel Edelson) (05/13/89)
How are protected fields inherited under public and private derivation. I'll use my intuition and ask the community to correct me if I'm wrong. Under private derivation I'd expect a protected field to become private in the derived class. Under public I'd guess that the protected field would remain protected. Is this correct? struct A { protected: int foo; }; struct B : private A { private: // I'd expect A::foo to be effectively private in a B }; struct C : public A { protected: // I'd expect A::foo to be effectively protected in a C }; If there's a difference between how this is currently handled and how it will be handled under version 2 I'd appreciate knowing that. Thanks in advance. daniel edelson daniel@saturn.ucsc.edu