As I understand how RTTI is implemented in various C++ compilers (such as GCC), a pointer to the type_info
data is stored in the vtable
data of each class.
And also as mentioned here, POD type may not have a vtable
.
But if POD types may not have a vtable
then where is the pointer to the type_info
stored? I know it is implementation-specific, but it would be better to be aware of a C++ compiler (such as GCC) internals.
type_info
, but don't have RTTI, and that's possible becausetype_info
isn't always RTTI. – Lucilius