|
ic-macros
0.1.5
|

Go to the source code of this file.
Macros | |
| #define | IC_IS_TYPE(type, expr) __builtin_types_compatible_p(type, __typeof__(expr)) |
| Compile-time check if expr is type. More... | |
| #define | IC_ASSERT_TYPE(type, expr) IC_BUILD_ASSERT(IC_IS_TYPE(type, expr), #expr " is not of type " #type) |
| Compile-time assertion that expr is type. More... | |
| #define | IC_REQUIRE_TYPE(type, expr) |
| Compile-time assertion that expr is type returning expr. More... | |
| #define | IC_IS_UINT(expr) |
| Compile-time constant check if expr is an unsigned integer. More... | |
| #define | IC_Z_REQUIRE_UINT(expr) |
| Compile-time require expr is an unsigned integer. More... | |
| #define | IC_REQUIRE_UINT(expr) |
| Compile-time constant require unsigned integer. More... | |
| #define | IC_IS_INT(expr) |
| Compile-time check if expr is a signed integer. More... | |
| #define | IC_REQUIRE_INT(expr) |
| Compile-time constant require signed integer. More... | |
| #define | IC_IS_FP(expr) |
| Compile-time constant check if expr is a floating point number. More... | |
| #define | IC_REQUIRE_FP(expr) |
| Compile-time constant require floating point number. More... | |
| #define IC_ASSERT_TYPE | ( | type, | |
| expr | |||
| ) | IC_BUILD_ASSERT(IC_IS_TYPE(type, expr), #expr " is not of type " #type) |
Compile-time assertion that expr is type.
| type | The expected type. |
| expr | The expression. |
Definition at line 32 of file assert_type.h.
| #define IC_IS_FP | ( | expr | ) |
Compile-time constant check if expr is a floating point number.
| expr | The expression. |
Definition at line 143 of file assert_type.h.
| #define IC_IS_INT | ( | expr | ) |
Compile-time check if expr is a signed integer.
| expr | The expression. |
Definition at line 117 of file assert_type.h.
| #define IC_IS_TYPE | ( | type, | |
| expr | |||
| ) | __builtin_types_compatible_p(type, __typeof__(expr)) |
Compile-time check if expr is type.
| type | The type. |
| expr | The expression. |
Definition at line 24 of file assert_type.h.
| #define IC_IS_UINT | ( | expr | ) |
Compile-time constant check if expr is an unsigned integer.
| expr | The expression. |
Definition at line 67 of file assert_type.h.
| #define IC_REQUIRE_FP | ( | expr | ) |
Compile-time constant require floating point number.
| expr | The expression. |
Definition at line 158 of file assert_type.h.
| #define IC_REQUIRE_INT | ( | expr | ) |
Compile-time constant require signed integer.
| expr | The expression. |
Definition at line 130 of file assert_type.h.
| #define IC_REQUIRE_TYPE | ( | type, | |
| expr | |||
| ) |
Compile-time assertion that expr is type returning expr.
| type | The expected type. |
| expr | The expression. |
Definition at line 42 of file assert_type.h.
| #define IC_REQUIRE_UINT | ( | expr | ) |
Compile-time constant require unsigned integer.
| expr | The expression. |
Definition at line 93 of file assert_type.h.
| #define IC_Z_REQUIRE_UINT | ( | expr | ) |
Compile-time require expr is an unsigned integer.
| expr | The expression. |
Definition at line 79 of file assert_type.h.