79449367

Date: 2025-02-18 19:25:07
Score: 0.5
Natty:
Report link

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.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jade Marker