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

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 []:

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)

Regards Hartmut

> --
> Dave Abrahams
> Boost Consulting
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at