There are some problems with that method though.
If, for example, you'd like to reverse the condition, you can't write
if (!(MouseEvent *mouse = dynamic_cast<MouseEvent *>(event)))
{}
because a definition is not a general expression, but was only added as an "extra" to allow its use in some cases in conditionals.