While I’ve seen rare cases where private inheritance was needed, I’ve never encountered a case where protected inheritance is needed. Does someone have an example?
While I’ve seen rare cases where private inheritance was needed, I’ve never encountered a
Share
People here seem to mistake Protected class inheritance and Protected methods.
FWIW, I’ve never seen anyone use protected class inheritance, and if I remember correctly I think Stroustrup even considered the ‘protected’ level to be a mistake in c++. There’s precious little you cannot do if you remove that protection level and only rely on public and private.