I know there are few question about const correctness where it is stated that the declaration of a function and its definition do not need to agree for value parameters. Thi
I like const correctness for situations like this: void foo(const Bar &b) //I know b cannot be changed { //do something with b }
void foo(const Bar &b) //I know b cannot be changed { //do something with b }
This lets me use b without fear of modifying it, but I don't have to pay the cost of a copy constructor.
b