assert.h
The assert.h
header provides a simple diagnostic mechanism.
Macros
assert(condition)
- Expands to a void expression
If the expression evaluates to false (0), the macro writes diagnostic information to the standard error stream and calls theabort
function.
If theNDEBUG
macro is define before the inclusion of theassert.h
header, theassert
macro does nothing and the build is assumed to be a release.
No value is returned. static_assert
- Expands to
_Static_assert
Macro for the keyword.