#
If NDEBUG is defined as a macro name at the point in the source file where <cassert> is included, the assert macro is defined as #define assert(.) ((void)0)
2
#
Otherwise, the assert macro puts a diagnostic test into programs; it expands to an expression of type void which has the following effects:
3
#
If __VA_ARGS__ does not expand to an assignment-expression, the program is ill-formed.
The macro assert is redefined according to the current state of NDEBUG each time that <cassert> is included.
An expression assert(E) is a constant subexpression, if

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant