Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 1999-08-17 14:52:24


At 01:26 PM 8/17/99 -0600, Greg Colvin wrote:

>From: Valentin Bonnard <Bonnard.V_at_[hidden]>
>> Greg Colvin wrote:
>> >
>> > From: Valentin Bonnard <Bonnard.V_at_[hidden]>
>> > > Greg Colvin wrote:
>> > > >
>> > > > > Greg Colvin wrote:
>> > > > >
>> > > > > > > Minor issues:
>> > > > > >
>> > > > > > This may be just a clarification, but what should be the
value of
>> > > > > > integer_traits<int32_t>::const_max? 2147483647?
>> > > > >
>> > > > > What could it be, except 2147483647 = 2**31-1 ?
>> > > >
>> > > > On a 36 bit machine?
>> > >
>> > > Of course. int32_t has 32 bits.
>> >
>> > So it is undefined on systems with no 32 bit type?
>
>So I take the answer to this question is yes, and int32_t is not
>a portable type.

Correct; int32_t isn't required. Use int_least32_t if you want a
required, and thus portable, type.

That is why http://www.boost.org/libs/integer/bin_ubin.htm specifies
int_least32_t at the value_type for bin32 holders.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk