Is there any use (or vice versa, cost) for passing a parameter by const value in the function signature?
So:
void foo( size_t nValue ) {
against
void foo( const size_t nValue ) {
The only reason I can think of this was to ensure that the parameter was not changed as part of the function, although since it was not passed by reference, there would be no wider impact outside the function.
source share