There's nothing more frustrating that instantiating a C++ type on the stack
like

     MyType foo;

and having to call a function with:

     static_cast<Base&>(foo).someVirtualMethod();

because "The base class is the interface" and all the
overriding methods are marked private.
This is just adding bureaucracy for absolutely no good reason and doesn't
help *anyone*.

On Fri, Mar 15, 2024 at 1:32 PM Christian Kandeler via Development <
development@qt-project.org> wrote:

> On 3/15/24 18:09, Marc Mutz via Development wrote:
> > I like simple rules. "Overrides should have the same access level as the
> > initial virtual function." is a simple rule.
>
> But it makes no sense in general. The base class is the interface, and
> overrides should have the least possible visibility for their purpose.
>
>
> Christian
>
> --
> Development mailing list
> Development@qt-project.org
> https://lists.qt-project.org/listinfo/development
>
-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to