because you are hiding c1::f() when you defined c2::f()
Actually i didnt undrestand🤔
The method doesn't use the instance.
To override the base class functions you need to make them virtual. But c1::f() at line 5 is not virtual so the definition of c2::f() hides c1::f(). As for why it's recommending static, you don't use any member variables in it. Read this: https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-convert-member-functions-to-static.html
Обсуждают сегодня