So when I have something like
struct Y: { virtual void wibble() = 0; virtual ~Y() {} }; struct X final: public Y { void wibble() override; X() {} virtual ~X() { wibble(); } };
gives me the virtualCallInConstructor message. I have to do this:
struct Y: { virtual void wibble() = 0; virtual ~Y() {} }; struct X final: public Y { void wibble() override final; X() {} virtual ~X() { wibble(); } };
to resolve it (cppcheck 2.8)
Thanks! I have created https://trac.cppcheck.net/ticket/11167
For information instead of override final you should write final.
override final
final
well, i thought i probably shouldn't be writing final at all, as the whole class as final!
Thank you for raising a ticket, i shall follow it.
Log in to post a comment.
So when I have something like
gives me the virtualCallInConstructor message. I have to do this:
to resolve it
(cppcheck 2.8)
Last edit: T Tanner 2022-07-02
Thanks! I have created https://trac.cppcheck.net/ticket/11167
For information instead of
override final
you should writefinal
.well, i thought i probably shouldn't be writing final at all, as the whole class as final!
Thank you for raising a ticket, i shall follow it.