Boost logo

Boost Users :

Subject: Re: [Boost-users] sizeof of boost::int8_t
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2009-12-16 10:52:37


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


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