
16 Dec
2009
16 Dec
'09
3:52 p.m.
running sizeof on a boost::int8_t returns 1, but what is the type? int/char?
It's type is 'boost::int8_t' which guarantees it to have the size of 8 bits or 1 byte. Probably it is a typedef to some template instantiation. If you ask which underlying type is used to implement it, than it is probably char. As far as I remember C++ standard guarantees a char to have the size of 1 byte. But anyway you can take a look at the implementation of boost::int8_t.
Hopefully signed char, as I would expect 'int' anything to be signed. Tony