What he means is that only constant values are allowed.
In such a case the compiler can replace the whole function call etc with the result of the calculation which can save quite some time in runtime afterwards.
But I think only C++ is in the situation where this is needed ... a real precompiler / compiler would check for const input and just replace the function call with the result of the calculation with the constant (as it is a constant as well).
In such a case the compiler can replace the whole function call etc with the result of the calculation which can save quite some time in runtime afterwards.
But I think only C++ is in the situation where this is needed ... a real precompiler / compiler would check for const input and just replace the function call with the result of the calculation with the constant (as it is a constant as well).