Re:Add a const here, delete a const there
by pontobart on Monday January 09, 2017 @04:58PM
(#13360212)
You cannot overload on the const. If you try to define both int a(int b) and int a(const int b) the compiler will complain about a redefinition.
You can declare the function using int a(int b) in the header and then define it via int a(const int b).
Ff a function takes a struct (or class) as argument can calls otherfunction(foo.bar), then the constness of foo's bar field matters. The same might apply to fields of this.