Portably safe to pass NULL/zero to dynamic_cast?

ยง5.2.7/4:

If the value of v is a null pointer
value in the pointer case, the result
is the null pointer value of type R.

So you don’t have to check for a null pointer yourself. Same goes for operator delete, deleting a null pointer has no effect.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)