ic-macros  0.1.5
build_assert.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IC_BUILD_ASSERT(expr, msg...)
 Compile-time assertion. More...
 

Macro Definition Documentation

◆ IC_BUILD_ASSERT

#define IC_BUILD_ASSERT (   expr,
  msg... 
)
Value:
enum _IC_Z_CONCAT(__build_assert_enum, __COUNTER__) { \
_IC_Z_CONCAT(__build_assert, __COUNTER__) = 1 / !!(expr) \
}

Compile-time assertion.

Parameters
exprAn expression that is a compile-time constant.
msgOptional string to describe the assertion should it fail.

Definition at line 27 of file build_assert.h.