23 mars 2017 kl. 17:22 skrev Thiago Macieira <thiago.macie...@intel.com>: > > You're contradicting yourself now. If private inheritance is not is-a, then > you can't tell me not to use private inheritance because QString isn't a > QStringView. > > I don't want QStringView to appear to users as a base of QString. I just want > code reuse.
I agree. Public and non-public derivation in C++ have vastly different meaning. Public derivation means is-a in the technical sense of LSP. Non-public derivation is an implementation detail that expresses has-a in a way that allows easier use or re-exposure of the members of the base class. It has to do with semantics of C++ and has zilch to do with OO design. Cheers, Kuba _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development