So this was already answered by kakkoko's comment. But I just wanted to put this into an answer so that the question is marked as solved.
So! Most compilers follow the Itanium abi, meaning that there is a defined interface. Essentially, when type_info
and __fundamental_type_info
are defined as the abi declares them (so matching the namespace, functions etc), then the compiler works some magic in the background and defines the type info for you!
I tried to put this into godbolt, but it seems it needs them to be defined in a separate file.