Consider:
template <typename T> void f(T&);
const int b = 2;
f(b); // ok
f(2); // error, can not bind rvalue to lvalue reference
Why is f(const int) allowed? the logic seems to indicate that if the programmer did not explicitly define the template parameter as const T&, he/she wanted to modify the binded-to variable.
So in this case the question is, why does template instantiation give itself the freedom to instantiate with consts when those were not explicitly required ?
Even if there was a rationale for allowing template instantiation to instantiate with consts, then why, in that case, would be binding to rvalues forbidden? you can bind rvalues to const lvalue references. In that case, the template would be instantiated to f<const int>, and f(2) would be allowed.
I want to know the reasoning behind these decisions, not references to the standard.