tmp/tmp_v98mmdi/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### General <a id="basic.contract.general">[[basic.contract.general]]</a>
|
| 2 |
+
|
| 3 |
+
*Contract assertions* allow the programmer to specify properties of the
|
| 4 |
+
state of the program that are expected to hold at certain points during
|
| 5 |
+
execution. Contract assertions are introduced by
|
| 6 |
+
*precondition-specifier*s, *postcondition-specifier*s
|
| 7 |
+
[[dcl.contract.func]], and *assertion-statement*s
|
| 8 |
+
[[stmt.contract.assert]].
|
| 9 |
+
|
| 10 |
+
Each contract assertion has a *contract-assertion predicate*, which is
|
| 11 |
+
an expression of type `bool`.
|
| 12 |
+
|
| 13 |
+
[*Note 1*: The value of the predicate is used to identify program
|
| 14 |
+
states that are expected. — *end note*]
|
| 15 |
+
|
| 16 |
+
An invocation of the macro `va_start` [[cstdarg.syn]] shall not be a
|
| 17 |
+
subexpression of the predicate of a contract assertion, no diagnostic
|
| 18 |
+
required.
|
| 19 |
+
|
| 20 |
+
[*Note 2*: Within the predicate of a contract assertion,
|
| 21 |
+
*id-expression*s referring to variables declared outside the contract
|
| 22 |
+
assertion are `const` [[expr.prim.id.unqual]], `this` is a pointer to
|
| 23 |
+
`const` [[expr.prim.this]], and the result object can be named if a
|
| 24 |
+
*result-name-introducer* [[dcl.contract.res]] has been
|
| 25 |
+
specified. — *end note*]
|
| 26 |
+
|