16 Dec
2005
16 Dec
'05
7:18 p.m.
I don't think this would do it. There is no guarentee that these types resolve to the same underlying type on the machine. That is _uint32 guarenties that it will hold a 32 bit number but doesn't guarentee that it is in fact a 32 bit number and may well be a 64 bit number on a particular platform.
Not true, boost::int32_t is a 32-bit integer type, *exactly* 32-bits wide. The boost::int_least32_t types may be wider than 32-bits, and may be what you were thinking of. However just because two types are both 32-bits wide, doesn't mean they have the same byte order. So still back to square one, but for a different reason. Well OK a 32-bit binary int would be portable between IA32 and IA32EM64, but not to IA64. John.