22 Diagnostics library [diagnostics]

22.3 Assertions [assertions]

22.3.2 The assert macro [assertions.assert]

An expression assert(E) is a constant subexpression ([defns.const.subexpr]), if
  • NDEBUG is defined at the point where assert is last defined or redefined, or
  • E contextually converted to bool (Clause [conv]) is a constant subexpression that evaluates to the value true.