That's correct. Using override and final on a non-virtual function is a
compile time error.
On Apr 27, 2015 5:34 PM, "L. David Baron" <[email protected]> wrote:

> On Monday 2015-04-27 15:48 -0400, Ehsan Akhgari wrote:
> > Right now, our coding style requires that both the virtual and override
> > keywords to be specified for overridden virtual functions.  A few things
> > have changed since we decided that a number of years ago:
> >
> > 1. The override and final keywords are now available on all of the
> > compilers that we build with, and we have stopped supporting compilers
> that
> > do not support these features.
> > 2. We have very recently gained the ability to run clang-based mass
> source
> > code transformations over our code that would let us enforce the coding
> > style [1].
> >
> > I would like to propose a change to our coding style, and run a mass
> > transformation over our code in order to enforce it.  I think we should
> > change it to require the usage of exactly one of these keywords per
> > *overridden* function: virtual, override, and final.  Here are the
> > advantages:
>
> Are the override and final keywords not allowed on non-virtual
> functions?
>
> -David
>
> --
> 𝄞   L. David Baron                         http://dbaron.org/   𝄂
> 𝄢   Mozilla                          https://www.mozilla.org/   𝄂
>              Before I built a wall I'd ask to know
>              What I was walling in or walling out,
>              And to whom I was like to give offense.
>                - Robert Frost, Mending Wall (1914)
>
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to