19
Diagnostics library
[diagnostics]
19.3
Assertions
[assertions]
19.3.1
General
[assertions.general]
1
#
The header
<
cassert
>
provides a macro for documenting C++ program assertions and a mechanism for disabling the assertion checks
.
19.3.2
Header
<cassert>
synopsis
[cassert.syn]
🔗
#define
assert
(
E
)
see below
1
#
The contents are the same as the C standard library header
<assert.h>
, except that a macro named
static_
assert
is not defined
.
See also:
ISO/IEC 9899:2018, 7.2
19.3.3
The
assert
macro
[assertions.assert]
1
#
An expression
assert
(
E
)
is a
constant subexpression
, if
(1.1)
NDEBUG
is defined at the point where
assert
is last defined or redefined, or
(1.2)
E
contextually converted to
bool
is a constant subexpression that evaluates to the value
true
.