A function prototype like this:
void f(const T& arg);
tells the caller: "I will not modify the passed argument, although you pass it by reference."
But to pass by value:
void f(const T arg);
changes to the passed argument are not displayed to the caller because a copy is being created, so it does not matter for the caller whether it is const or not. But it says: "After creating a copy of the argument, this copy will not change during the execution of this function," which may be useful if you want to make sure that the person who will perform this function will consider it as a constant.
But, in addition to the fact that the design of your code is easier to understand for people who will read it in the future, using the const qualifier does not make much sense here.
source share