
28 Mar
2006
28 Mar
'06
1:52 a.m.
You make a good point. We should want sizeof(other_enum)==sizeof(c_enum). Not everyone needs to map between strings and enumerations
While I can't guarantee that, that is the case most of the time. Put it this way - it will be true if your compiler will take a structure with one member and no virtual functions and make sizeof(structure)==sizeof(member). I think I will add a feature to allow the programmer to specify the underlying enum size, too (i.e. int, long, etc.) As I said, the implementation is both space and time efficient. Tom