A fast C++ dynamic_cast<> alternative.