Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-12-16 14:18:03


> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net