How far do you go with const? Do you just make functions const when necessary or do you go the whole hog and use it everywhere? For example, imag
const
I say const your value parameters.
Consider this buggy function:
bool isZero(int number) { if (number = 0) // whoops, should be number == 0 return true; else return false; }
If the number parameter was const, the compiler would stop and warn us of the bug.