Boost logo

Boost :

From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 1999-08-17 12:46:14


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?
>
> Maybe I'm being dense, but I thought that int32_t was just a typedef for a
> big enough type for 32 bits.

You are describing int_least32_t. int32_t has exactly 32 bits.

> So on a twos-complement 36 bit machine we might have
>
> typedef int int32_t;

We might not.

> in which case integer_traits<int32_t>::const_max would have to be 2**35-1.

No

-- 
Valentin Bonnard

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