Go to the documentation of this file.
21 #define IC_CAST_ENUM(type, min, max, expr) \
23 IC_BUILD_ASSERT(__typeof__(expr) == type || IC_IS_INT(expr) || IC_IS_UINT(expr)); \
24 IC_CAST_NUMBER(type, min, max, expr); \
36 #define IC_Z_CAST_ENUM(type, min, max, expr) \
38 __auto_type const _IC_Z_CAST_NUMBER_expr_ = IC_REQUIRE_NOT_CONSTANT(expr); \
39 IC_BUILD_ASSERT(!IC_IS_FP(_IC_Z_CAST_NUMBER_expr_)); \
40 IC_ASSERT(IC_IN_RANGE(_IC_Z_CAST_NUMBER_expr_, min, max)); \
41 (type) _IC_Z_CAST_NUMBER_expr_; \