I am trying to find whether the C++ standard specifies the relationships between the size of various types. For example, this answer at https://stackoverflow.com/a/589599/1175080 seems claims:
sizeof(short int) <= sizeof(int) <= sizeof(long int)
Another answer at https://stackoverflow.com/a/589684/1175080 has a similar statement:
sizeof(int) <= sizeof(long)
I am going through n3337.pdf (I believe a good proxy for C+11 standard) but I can't find the specific language that guarantees these inequalities.
In n1256 (C99), I can find the specific language in section 5.2.4.2.1 Sizes of integer types which clearly spells out the minimum and maximum values for each type which indirectly establishes the relative ordering between the sizes.
Are these inequalities similarly defined in the C++ standard or are they directly inherited from C? Where is the language for this in the standard?