I\'m looking for detailed information regarding the size of basic C++ types. I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler.
The C++ Standard says it like this:
3.9.1, §2:
There are five signed integer types : "signed char", "short int", "int", "long int", and "long long int". In this list, each type provides at least as much storage as those preceding it in the list. Plain ints have the natural size suggested by the architecture of the execution environment (44); the other signed integer types are provided to meet special needs.
(44) that is, large enough to contain any value in the range of INT_MIN and INT_MAX, as defined in the header
.
The conclusion: It depends on which architecture you're working on. Any other assumption is false.