You are wrong. The expression
static_cast<int*>(0)
or whatever you saw in Michael's code does not create a temporary integer.
The syntax you quoted is neither the original syntax nor the context
in which I wrote my response. The original syntax and context was:
print(*static_cast<int*>(0));
not:
static_cast<int*>(0)
I may be wrong (I have been wrong before; however I'm still
verifying), but what I am saying is that in the construction of the
call to 'print', a temporary variable of type 'int' is created and a
reference to it passed to 'print', which must be valid because the OP
indicated it printed '0'. IOW, the zero is the value of the temporary
int variable, not the value of the reference.
Let me repeat least I am not clear, I am digging through my reference
from which I am basing my opion, which as I said could be wrong.
Anyway, the syntax being quoted by others is not in the context of
which I was responding.