Modifying a temporary value doesn't make sense, it's to help prevent errors that can be caused by accidentally modifying a value that otherwise has no meaning being modified.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
void func1(int &a)
{
a = 10;
}
int main()
{
double foo = 0;
func1(foo); // if this was legal
std::cout << foo; // outputs 0
}