
From: Martin Bonner <martin.bonner@pitechnology.com>
David Abrahams <dave@boost-consulting.com> writes:
Rob Stewart <stewart@sig.com> 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?
Yes.
That's a bit gnomic.
Indeed.
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 bits.
Thanks for jumping in, but where is that in the standard? I have ISO/IEC 14882, 1st ed. What should I have? -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;