I would like to know this in case RTTI is disabled in some compiler environment.
Use case:
I used this in my code and it worked on my machine but during integration testing the code failed to run properly, rather crashed.
I supposed it would have returned null in case RTTI is not there which was handled in my code but the behavior was unexpected.
What should I have checked to terminate it elegantly?
Also, when I used a wrapper of dynamic_cast (defined in our inhouse framework), it worked fine. What kind of implementation would that wrapper have to fulfill this requirement?