From Jason Turner

[assertions]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp65un_a7o/{from.md → to.md} +21 -6
tmp/tmp65un_a7o/{from.md → to.md} RENAMED
@@ -1,11 +1,26 @@
1
  ## Assertions <a id="assertions">[[assertions]]</a>
2
 
3
- The header `<cassert>`, described in (Table 
4
- [[tab:diagnostics.hdr.cassert]]), provides a macro for documenting
5
- C++program assertions and a mechanism for disabling the assertion
6
- checks.
7
 
8
- The contents are the same as the Standard C library header `<assert.h>`.
9
 
10
- ISO C 7.2.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
 
1
  ## Assertions <a id="assertions">[[assertions]]</a>
2
 
3
+ The header `<cassert>` provides a macro for documenting C++program
4
+ assertions and a mechanism for disabling the assertion checks.
 
 
5
 
6
+ ### Header `<cassert>` synopsis <a id="cassert.syn">[[cassert.syn]]</a>
7
 
8
+ ``` cpp
9
+ #define assert(E) see below
10
+ ```
11
+
12
+ The contents are the same as the C standard library header `<assert.h>`,
13
+ except that a macro named `static_assert` is not defined.
14
+
15
+ ISO C 7.2.
16
+
17
+ ### The `assert` macro <a id="assertions.assert">[[assertions.assert]]</a>
18
+
19
+ An expression `assert(E)` is a constant subexpression (
20
+ [[defns.const.subexpr]]), if
21
+
22
+ - `NDEBUG` is defined at the point where `assert` is last defined or
23
+ redefined, or
24
+ - `E` contextually converted to `bool` (Clause  [[conv]]) is a constant
25
+ subexpression that evaluates to the value `true`.
26