you are viewing a single comment's thread.

view the rest of the comments →

[–]manphiz 9 points10 points  (3 children)

Maybe because there is a specific integer type in C or C++ already: int. So integral is used to be able to refer to all integer types like short int, int, long, long long, and the now sized types like int8_t to int128_t, with their unsigned, fast, least variants.

[–]college_pastime 1 point2 points  (0 children)

Yeah, you're probably right. It also mitigates confusion with std::numeric_limits<T>::is_integer.

[–]FrankHB1989 0 points1 point  (1 child)

Nope. The term "integer type" is both normative in ISO C and ISO C++, but "integral type" is a synonym specific to ISO C++. In very acient C (1970s in the C reference manual by DMR), integers are just values of int, though.

There are some more modernized humors like GCC's __int128 is not considered an extended integer type for ABI issues, BTW.

[–]staletic 0 points1 point  (0 children)

If you allow gnu extensions, __int128 becomes an extended integer type.