tmp/tmp9nckc8ap/{from.md → to.md}
RENAMED
|
@@ -9,17 +9,21 @@ present and shall have the form:
|
|
| 9 |
```
|
| 10 |
|
| 11 |
The expression is contextually converted to `bool` [[conv.general]]. The
|
| 12 |
expression is not evaluated. If the converted expression would evaluate
|
| 13 |
to `true` at the point where the assumption appears, the assumption has
|
| 14 |
-
no effect. Otherwise, the
|
|
|
|
| 15 |
|
| 16 |
[*Note 1*: The expression is potentially evaluated [[basic.def.odr]].
|
| 17 |
The use of assumptions is intended to allow implementations to analyze
|
| 18 |
the form of the expression and deduce information used to optimize the
|
| 19 |
program. Implementations are not required to deduce any information from
|
| 20 |
-
any particular assumption.
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
[*Example 1*:
|
| 23 |
|
| 24 |
``` cpp
|
| 25 |
int divide_by_32(int x) {
|
|
|
|
| 9 |
```
|
| 10 |
|
| 11 |
The expression is contextually converted to `bool` [[conv.general]]. The
|
| 12 |
expression is not evaluated. If the converted expression would evaluate
|
| 13 |
to `true` at the point where the assumption appears, the assumption has
|
| 14 |
+
no effect. Otherwise, evaluation of the assumption has runtime-undefined
|
| 15 |
+
behavior.
|
| 16 |
|
| 17 |
[*Note 1*: The expression is potentially evaluated [[basic.def.odr]].
|
| 18 |
The use of assumptions is intended to allow implementations to analyze
|
| 19 |
the form of the expression and deduce information used to optimize the
|
| 20 |
program. Implementations are not required to deduce any information from
|
| 21 |
+
any particular assumption. It is expected that the value of a
|
| 22 |
+
*has-attribute-expression* for the `assume` attribute is `0` if an
|
| 23 |
+
implementation does not attempt to deduce any such information from
|
| 24 |
+
assumptions. — *end note*]
|
| 25 |
|
| 26 |
[*Example 1*:
|
| 27 |
|
| 28 |
``` cpp
|
| 29 |
int divide_by_32(int x) {
|