"Because readAll is not virtual."

😱, that's true. It's not!!!!
Wow, that's definitely another reason to flag it.
Why did i assume it is a virtual method!?

But as you said Thiago,  it is a Compiler implementer choice to add this feature, rather than a standard feature.  You convinced me. I need to check with one of them.

Jason,
I could not find an example better than the one i gave. Even to invent one, i always find myself breaking one or two of OOP principles. 
But i think such attribute (warning) is nice to have, especially for those who internalize information and work from their memory.

Everytime i post a proposal or a question in this group,  my Ego brace itself for helicopter capsize. But hey, i always come out learning a trick or two.

Thanks all.

Nad



Sent from my Galaxy


-------- Original message --------
From: Thiago Macieira via Std-Proposals <std-proposals@lists.isocpp.org>
Date: 3/21/22 4:46 AM (GMT+04:00)
To: std-proposals@lists.isocpp.org
Cc: Thiago Macieira <thiago@macieira.org>
Subject: Re: [std-proposals] Detect non overriden function

On Sunday, 20 March 2022 15:53:22 -03 organicoman via Std-Proposals wrote:
> Jason, All your explanations and reasoning is correct, but if didn't see the
> case I'm talking about in production,  i wouldn't think about this feature.
> Please check the implementation of QProcess, which is a derived class of
> QIODevice, especially the function QProcess::readAll, and its 2
> specialization,  QProcess:: readAllStandardOutput,
> QProcess::readAllStandardError.QProcess::readAll is not overriding the base
> class QIODevice::readAll

Because readAll is not virtual.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering



--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals