Reputation: 2281
Say you have the type info for a class, is it possible to get that type using its typeinfo
? Basically, if typeid
maps a typeinfo
to a type is it possible to do the reverse and map a type
to a typeinfo
?
(I doubt there is but since C++
never ceases to surprise me both pleasantly and unpleasantly I thought I'd ask)
Upvotes: 0
Views: 342
Reputation: 102
Type in c++ is compile time information only. typeinfo is runtime information. What could you do with type in runtime? Nothing.
Upvotes: 0