|
7820 | 7820 | if a \grammarterm{result-name-introducer}\iref{dcl.contract.res} has been specified. |
7821 | 7821 | \end{note} |
7822 | 7822 |
|
| 7823 | +\rSec2[basic.contract.control]{Control} |
| 7824 | + |
| 7825 | +\indextext{contract assertion!control}% |
| 7826 | + |
| 7827 | +\begin{bnf} |
| 7828 | +\nontermdef{assertion-control-specifier}\br |
| 7829 | + \terminal{<} id-expression \terminal{>} |
| 7830 | +\end{bnf} |
| 7831 | + |
| 7832 | +\pnum |
| 7833 | +The optional \grammarterm{assertion-control-specifier} of a |
| 7834 | +\grammarterm{precondition-specifier}, \grammarterm{postcondition-specifier}, |
| 7835 | +or \grammarterm{assertion-statement} indicates that the |
| 7836 | +introduced contract assertion is a \defnadj{terminating}{contract assertion}. |
| 7837 | + |
| 7838 | +\pnum |
| 7839 | +The \grammarterm{id-expression} |
| 7840 | +shall not be |
| 7841 | +type-dependent or value-dependent and |
| 7842 | +shall denote |
| 7843 | +\tcode{std::con\-tracts::con\-trols::enforced}\iref{contracts.syn}. |
| 7844 | + |
7823 | 7845 | \rSec2[basic.contract.eval]{Evaluation} |
7824 | 7846 |
|
7825 | 7847 | \pnum |
|
7839 | 7861 | It is |
7840 | 7862 | \impldef{evaluation semantic used for the evaluation of a contract assertion} |
7841 | 7863 | which evaluation semantic is used |
7842 | | -for any given evaluation of a contract assertion. |
| 7864 | +for any given evaluation of a contract assertion; |
| 7865 | +the evaluation semantic |
| 7866 | +used for the evaluation |
| 7867 | +of a terminating contract assertion |
| 7868 | +is a terminating semantic. |
7843 | 7869 | \begin{note} |
7844 | 7870 | The range and flexibility of available choices of |
7845 | 7871 | evaluation semantics depends on the implementation |
|
7848 | 7874 | for different evaluations of the same contract assertion, |
7849 | 7875 | including evaluations during constant evaluation. |
7850 | 7876 | \end{note} |
| 7877 | +\begin{note} |
| 7878 | +The notional evaluation of a contract assertion |
| 7879 | +to determine if a variable is constant-initializable |
| 7880 | +is always performed with the ignore evaluation semantic\iref{expr.const.init}. |
| 7881 | +\end{note} |
7851 | 7882 |
|
7852 | 7883 | \pnum |
7853 | 7884 | \recommended |
7854 | 7885 | An implementation should provide |
7855 | 7886 | the option to translate a program |
7856 | | -such that all evaluations of contract assertions use the ignore semantic |
| 7887 | +such that all evaluations of contract assertions |
| 7888 | +that are not terminating contract assertions |
| 7889 | +use the ignore semantic |
7857 | 7890 | as well as |
7858 | 7891 | the option to translate a program |
7859 | 7892 | such that all evaluations of contract assertions use the enforce semantic. |
|
0 commit comments