C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Detect non overriden function

From: organicoman <organicoman_at_[hidden]>
Date: Mon, 21 Mar 2022 10:48:56 +0400
"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.NadSent from my Galaxy
-------- Original message --------From: Thiago Macieira via Std-Proposals <std-proposals_at_[hidden]> Date: 3/21/22 4:46 AM (GMT+04:00) To: std-proposals_at_[hidden] Cc: Thiago Macieira <thiago_at_[hidden]> 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::readAllBecause readAll is not virtual.-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel DPG Cloud Engineering-- Std-Proposals mailing listStd-Proposals_at_[hidden]://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2022-03-21 06:49:06