Next: , Up: Integer Properties


13.5.1 Integer Type Determination

TYPE_IS_INTEGER (t) expands to a constant expression that is 1 if the arithmetic type t is an integer type. _Bool counts as an integer type.

TYPE_SIGNED (t) expands to a constant expression that is 1 if the arithmetic type t is a signed integer type or a floating type. If t is an integer type, TYPE_SIGNED (t) expands to an integer constant expression.

Example usage:

     #include <intprops.h>
     #include <time.h>
     enum
     {
       time_t_is_signed_integer =
         TYPE_IS_INTEGER (time_t) && TYPE_SIGNED (time_t)
     };