Can you access the public and protected members and functions of a base class if you have private inheritance?
Show answer and explanation
Yes, the derived implementation can access inherited public and protected members. Private inheritance changes their accessibility through the derived interface and blocks implicit public conversion to the base for outside callers.
Yes, the derived implementation can access inherited public and protected members. Private inheritance changes their accessibility through the derived interface and blocks implicit public conversion to the base for outside callers.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.