Is the TypeInfo given by typeid() guaranteed to be the same for a type regardless of where I call it? I guess my question is, is the TypeInfo a valid way to dynamically check types?

I am implementing a message passing system for an entity-component system, I was planning to use structs as messages and use the TypeInfo to determine where they are supposed to go. Will this cause any problems?

Also will typeid() allocate? Or is the TypeInfo statically allocated at compile time?

Also how does shared libs affect this? Will a TypeInfo passed across different libs still match up?

Thanks

Reply via email to