[Development] final value classes: some background information and plans
marc.mutz at kdab.com
Wed Mar 7 12:37:51 CET 2012
On Wednesday March 7 2012, andre.poenitz at nokia.com wrote:
> Marc Mutz wote:
> > I've uploaded a patch series that makes most of the value classes in
> > QtCore final in the C++11 sense (ie. under a C++11 compiler, these can no
> > longer be inherited from).
> I disagree with the idea of making Qt core classes non-inheritable.
> While inheritance from "value" classes is rarely needed, it _is_ useful at
> times. Most notably, private inheritance is even "pretty safe".
> There is no need to artificially deprive us of useful tools.
Name one instance where (non-public, since public isn't safe) inheritance is
useful and not just laziness on the part of the inheriter :)
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
More information about the Development