tmp/tmpvp7g00a2/{from.md → to.md}
RENAMED
|
@@ -4,17 +4,23 @@ Many binary operators that expect operands of arithmetic or enumeration
|
|
| 4 |
type cause conversions and yield result types in a similar way. The
|
| 5 |
purpose is to yield a common type, which is also the type of the result.
|
| 6 |
This pattern is called the *usual arithmetic conversions*, which are
|
| 7 |
defined as follows:
|
| 8 |
|
|
|
|
|
|
|
|
|
|
| 9 |
- If either operand is of scoped enumeration type [[dcl.enum]], no
|
| 10 |
conversions are performed; if the other operand does not have the same
|
| 11 |
type, the expression is ill-formed.
|
|
|
|
|
|
|
|
|
|
| 12 |
- Otherwise, if either operand is of floating-point type, the following
|
| 13 |
rules are applied:
|
| 14 |
- If both operands have the same type, no further conversion is
|
| 15 |
-
|
| 16 |
- Otherwise, if one of the operands is of a non-floating-point type,
|
| 17 |
that operand is converted to the type of the operand with the
|
| 18 |
floating-point type.
|
| 19 |
- Otherwise, if the floating-point conversion ranks [[conv.rank]] of
|
| 20 |
the types of the operands are ordered but not equal, then the
|
|
@@ -38,9 +44,5 @@ defined as follows:
|
|
| 38 |
`U`.
|
| 39 |
- Otherwise, if `S` can represent all of the values of `U`, `C` is
|
| 40 |
`S`.
|
| 41 |
- Otherwise, `C` is the unsigned integer type corresponding to `S`.
|
| 42 |
|
| 43 |
-
If one operand is of enumeration type and the other operand is of a
|
| 44 |
-
different enumeration type or a floating-point type, this behavior is
|
| 45 |
-
deprecated [[depr.arith.conv.enum]].
|
| 46 |
-
|
|
|
|
| 4 |
type cause conversions and yield result types in a similar way. The
|
| 5 |
purpose is to yield a common type, which is also the type of the result.
|
| 6 |
This pattern is called the *usual arithmetic conversions*, which are
|
| 7 |
defined as follows:
|
| 8 |
|
| 9 |
+
- The lvalue-to-rvalue conversion [[conv.lval]] is applied to each
|
| 10 |
+
operand and the resulting prvalues are used in place of the original
|
| 11 |
+
operands for the remainder of this section.
|
| 12 |
- If either operand is of scoped enumeration type [[dcl.enum]], no
|
| 13 |
conversions are performed; if the other operand does not have the same
|
| 14 |
type, the expression is ill-formed.
|
| 15 |
+
- Otherwise, if one operand is of enumeration type and the other operand
|
| 16 |
+
is of a different enumeration type or a floating-point type, the
|
| 17 |
+
expression is ill-formed.
|
| 18 |
- Otherwise, if either operand is of floating-point type, the following
|
| 19 |
rules are applied:
|
| 20 |
- If both operands have the same type, no further conversion is
|
| 21 |
+
performed.
|
| 22 |
- Otherwise, if one of the operands is of a non-floating-point type,
|
| 23 |
that operand is converted to the type of the operand with the
|
| 24 |
floating-point type.
|
| 25 |
- Otherwise, if the floating-point conversion ranks [[conv.rank]] of
|
| 26 |
the types of the operands are ordered but not equal, then the
|
|
|
|
| 44 |
`U`.
|
| 45 |
- Otherwise, if `S` can represent all of the values of `U`, `C` is
|
| 46 |
`S`.
|
| 47 |
- Otherwise, `C` is the unsigned integer type corresponding to `S`.
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|