AFAIK sizeof doesn\'t evaluate its operands it C++.
E.g.
int x = 0; sizeof(x += 1); // value of x is not changed
But what does this
I don't know much about this, but if as you say, sizeof doesn't evaluate its operand then it must just rely on the type of the expression it's used on. So I would guess that arr on its own has a different type to arr+0, and that's why it was used.
arr
arr+0