Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 1999-08-17 14:26:26


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.

> > 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
>
> ------------------------------------------------------------------------
> Listen to Britany spears and more top artists
> now at audiohighway.com!
> http://clickhere.egroups.com/click/395
>
>
> eGroups.com home: http://www.egroups.com/group/boost
> http://www.egroups.com - Simplifying group communications
>
>
>
>
>


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