I always thought the following types are "fundamental types", so I thought my answer to this question would be correct, but surprisingly it got downvoted...
Searching the web, I found this. So, IBM says as well those types are fundamental types..
Well how do you interpret the Standard? Are the following types (and similar types), "fundamental types" according to the C++ standard ?
unsigned int
signed char
long double
short int
unsigned short int
EDIT:
Again related to this question:
Comceau and gcc dont treat types like "long double", "short int" or "unsigned int" as "fundamental type"! (whereas ibm, intel and microsoft compilers do..)
If they did treat such types as fundamental types, following code should compile: short int i = short int()
EDIT:
removed long long types, as i forgot they are not officially standard yet..
long long is not supported by the current ISO C++03 standard. However, the C++0x draft standard does include this type:
3.9.1 Fundamental types
2 There are five standard signed integer types : “signed char”, “short int”, “int”, “long int”, and “long long int”.
ISO C99 added this particular data-type (though this was/is available on many compilers as a non-standard extension). C++03 does not fully support all C99 features. Quite a few C++ compilers do however allow this as an extension (e.g. Comeau requires --long_long).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With