Boost logo

Boost :

From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2005-06-09 03:13:03

> Rob Stewart <stewart_at_[hidden]> writes:
>> AFAIK, the only thing you can say about the size of int is that
>> it must handle the INT_MIN to INT_MAX range on a given platform
>> and the only thing you can say about short is that it is no
>> bigger than int and at least one byte.
>> Have I missed something that requires both to be at least 16
>> bits?

David Abrahams <dave_at_[hidden]> writes:
> Yes.

That's a bit gnomic.

What you have missed Rob is that the standard requires SHRT_MIN <= -32767
and SHRT_MAX >= 32767. That implies short must have at least 16 bits.

There is a similar requirement on long that means it must be at least 32

Martin Bonner
Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ,
ENGLAND Tel: +44 (0)1223 441434

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