struct base {
void foo() {}
};
struct derived : public base {
void foo() {}
};
for example, I want above code has error or warning because they have same foo function in base and derived. Is there any compiler option or code analyzer can do that?
You can not use "final", is overwrite, not override. It's not a virtual function.