NDEBUG macro — Enables or disables compilation of assertions
#define NDEBUG
#include <cassert>
The NDEBUG
macro is not
defined by <cassert>
or
anywhere else in the standard C++ library. Instead, you can define
the macro before including the <cassert>
header to disable the
assert
macro.
In one source file, you can define and undefine NDEBUG
multiple times, each time followed
by #include
<cassert>
, to enable or disable the
assert
macro multiple times in
the same source file.