In this article in the Supporting Parameters by Reference section, they point out the problem with and provide the solution to references. My question is: why don't they just declare the parameters as references in the first place? I.e., instead of:
const Parm parm_;
do:
Parm &parm_;
It would have to be
to allow for the general case and then you would run into the same problem with trying to decrement, or in some other way modify, the parameter. The other option would be to create a lot more classes to handle const and non-const versions.
Using a reference would prevent using the result of an expression as param since the temporary reference created as the function parameter would go out of scope immediately.
Though he could remove all the const's and let it be part of the type and not allow expressions, I think there is still great value in requiring ByRef to aid in clarity.