
16 Dec
2009
16 Dec
'09
4:55 p.m.
running sizeof on a boost::int8_t returns 1, but what is the type? int/char?
Strictly speaking you're not allowed to ask that question... it's a secret :-) The idea is that int8_t is whatever platform-dependent type has 8-bits and is signed. But since you ask, it's "signed char" on any platform you're ever likely to encounter. You should never make any assumptions about the actual types of the int#_t typedefs though - some of them really are "unmentionable" platform dependent types on some platforms - but take a look at boost/cstdint.hpp for the details. HTH, John.