Hands-On Embedded Programming with C++17
上QQ阅读APP看书,第一时间看更新

Runtime type information

The main purpose of RTTI is to allow the use of safe typecasting, like with the dynamic_cast<> operator. As RTTI involves storing additional information for each polymorphic class, it has a certain amount of overhead.

This is a runtime feature, as the name gives away, and thus can be disabled if you don't need the features it provides. Disabling RTTI is common practice on some embedded platforms, especially as it is rarely used on low-resource platforms, such as 8-bit MCUs.