Boost logo

Boost :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2006-09-21 09:39:26


Peter Dimov wrote:

> > Actually that's not correct. The Standard is quite clear when it
> > states [3.9.1.2]:
> >
> > There are four signed integer types: "signed char", "short int",
> > "int", and "long int." In this list, each type provides at least as
> > much storage as those preceding it in the list.
> >
> > And [3.9.1.3]:
> >
> > For each of the signed integer types, there exists a corresponding
> > (but different) unsigned integer type:
> > "unsigned char", "unsigned short int", "unsigned int", and
> "unsigned
> > long int," each of which occupies the same amount of
> storage and has
> > the same alignment requirements (3.9) as the corresponding signed
> > integer type)
>
> You need the C standard to get the complete picture; it
> states that USHRT_MAX is at least 65535.

The corresponding section of the C Standard you're referring to states
[Appendix E:1, implementation limits (informative)]:

The contents of the header <limits.h> are given below, in alphabetical
order. The
minimum magnitudes shown shall be replaced by implementation-defined
magnitudes
with the same sign.

So no restriction imposed from the Standard here, AFAIU.

Regards Hartmut

>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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