But I am worried the RTTI information is being held in some other place.
It is.
When I ask the compiler to perform dynamic_cast
, then it must honour the contract of dynamic_cast
, and that requires RTTI. The only way to escape this is to have a compiler setting which would give an error or UB when you attempt to use dynamic_cast
in this fashion. The compiler is obliged to provide RTTI by the language, unless you explicitly tell it otherwise.