3.8 KiB
[support.contract.enum]
17 Language support library [support]
17.10 Contract-violation handling [support.contract]
17.10.2 Enumerations [support.contract.enum]
Recommended practice: For all enumerations in [support.contract.enum], if implementation-defined enumerators are provided, they should have a minimum value of 1000.
The enumerators of assertion_kind correspond to the syntactic forms of a contract assertion ([basic.contract.general]), with meanings listed in Table 44.
Table 44 — Enum assertion_kind [tab:support.contract.enum.kind]
| ð Name |
Meaning |
|---|---|
| ð pre |
A precondition assertion |
| ð post |
A postcondition assertion |
| ð assert |
An assertion-statement |
| ð |
The enumerators of evaluation_semantic correspond to the evaluation semantics with which a contract assertion may be evaluated ([basic.contract.eval]), with meanings listed in Table 45.
Table 45 — Enum evaluation_semantic [tab:support.contract.enum.semantic]
| ð Name |
Meaning |
|---|---|
| ð ignore |
Ignore evaluation semantic |
| ð observe |
Observe evaluation semantic |
| ð enforce |
Enforce evaluation semantic |
| ð quick_enforce |
Quick-enforce evaluation semantic |
| ð |
The enumerators of detection_mode correspond to the manners in which a contract violation can be identified ([basic.contract.eval]), with meanings listed in Table 46.
Table 46 — Enum detection_mode [tab:support.contract.enum.detection]
| ð Name |
Meaning |
|---|---|
| ð predicate_false |
The predicate of the contract assertion evaluated to false or would have evaluated to false. |
| ð evaluation_exception |
An uncaught exception occurred during evaluation of the contract assertion. |
| ð |