Inheritance Downcasting is Dangerous
Converting a base-class pointer to a derived-class pointer is downcasting. We should be careful when we do that in order to avoid UBs.
Converting a base-class pointer to a derived-class pointer is downcasting. We should be careful when we do that in order to avoid UBs.