RTTI and Portability in C++

c++, portability, rtti

Solution

RTTI is not needed for virtual functions.

It is mainly used for `dynamic_cast` and `typeid`.

Problem

If a compiler doesn't "support" RTTI, does that mean that the compiler can not handle class hierarchies that have virtual functions in them? Or have I been misunderstanding the literature about how RTTI isn't portable, and the issues lie elsewhere? Thank you all for your comments!

Original source