This rule exists as a check in clang-tidy see https://clang.llvm.org/extra/clang-tidy/checks/readability/avoid-const-params-in-decls.html
A function that takes it parameter by value will have the same type signature whether the parameter is declared const
or not.
As a consequence, you can have this:
void func(int arg);
void func(const int arg)
{
}
Which is completely fine. Often the function declaration is in a header file and the function definition is in a source file, but the important part is that the function has a declaration that is separate from the function definition.
However
void func(const int arg);
Is not compliant. The const
is redundant and should be removed.