Boost logo

Boost :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2006-09-21 08:55:17


> >> Aristid Breitkreuz <aribrei_at_[hidden]> writes:
> >>
> >>> You can't assume short is 16-bits (but that's more or
> less academic).
> >>
> >> Academic or no, I'd love to hear your reasoning on that one.
> >
> > The standard is clear that short must be /at least/ 16 bits
>
> Okay, that's all I needed to hear, thanks.

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)

HTH
Regards Hartmut

>
> --
> Dave Abrahams
> Boost Consulting
> www.boost-consulting.com
>
> _______________________________________________
> 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