Declared in elBase.h
Ensures that the given condition is satisfied.
In DEBUG mode:
If the logical expression Cond evaluates to false, the macro prints an error message and terminates the program with an exit code 1001 (internal fatal error).
For example: M_ASSERT(x<10) generates an error if x is NOT less than 10 (i.e. the condition is not asserted)
If Cond evaluates to true, nothing happens.
In RELEASE mode the macro is empty. Thus, M_ASSERT allows testing algorithmic correctness without any performance penalty in RELEASE mode.
- Use this macro for internal consistency checks. For testing the validity of input parameters use M_PARAM_CHECK - the more user-friendly version of M_ASSERT
Let us know
Please Contact us to report any errors on this page, or to suggest any improvements.