|
421 | 421 | \rSec1[expr.arith.conv]{Usual arithmetic conversions}
|
422 | 422 |
|
423 | 423 | \pnum
|
424 |
| -\indextext{conversion!usual arithmetic}% |
425 | 424 | Many binary operators that expect operands of arithmetic or enumeration
|
426 | 425 | type cause conversions and yield result types in a similar way. The
|
427 | 426 | purpose is to yield a common type, which is also the type of the result.
|
428 |
| -This pattern is called the \term{usual arithmetic conversions}, |
| 427 | +This pattern is called the \defnx{usual arithmetic conversions}{conversion!usual arithmetic}, |
429 | 428 | which are defined as follows:
|
430 | 429 |
|
431 | 430 | \begin{itemize}
|
|
4684 | 4683 | \pnum
|
4685 | 4684 | The operands of \tcode{*} and \tcode{/} shall have arithmetic or unscoped
|
4686 | 4685 | enumeration type; the operands of \tcode{\%} shall have integral or unscoped
|
4687 |
| -enumeration type. The usual arithmetic conversions are performed on the |
| 4686 | +enumeration type. The usual arithmetic conversions\iref{expr.arith.conv} are performed on the |
4688 | 4687 | operands and determine the type of the result.
|
4689 | 4688 |
|
4690 | 4689 | \pnum
|
|
4709 | 4708 |
|
4710 | 4709 | \pnum
|
4711 | 4710 | The additive operators \tcode{+} and \tcode{-} group left-to-right. The
|
4712 |
| -usual arithmetic conversions are performed for operands of arithmetic or |
| 4711 | +usual arithmetic conversions\iref{expr.arith.conv} are performed for operands of arithmetic or |
4713 | 4712 | enumeration type.
|
4714 | 4713 |
|
4715 | 4714 | \indextext{operator!addition}%
|
|
5047 | 5046 | \tcode{bool}.
|
5048 | 5047 |
|
5049 | 5048 | \pnum
|
5050 |
| -The usual arithmetic conversions are performed on operands of arithmetic |
| 5049 | +The usual arithmetic conversions\iref{expr.arith.conv} are performed on operands of arithmetic |
5051 | 5050 | or enumeration type. If both operands are pointers, pointer
|
5052 | 5051 | conversions\iref{conv.ptr} and qualification conversions\iref{conv.qual}
|
5053 | 5052 | are performed to bring
|
|
5218 | 5217 |
|
5219 | 5218 | \pnum
|
5220 | 5219 | If both operands are of arithmetic or enumeration type, the usual arithmetic
|
5221 |
| -conversions are performed on both operands; each of the operators shall yield |
| 5220 | +conversions\iref{expr.arith.conv} are performed on both operands; each of the operators shall yield |
5222 | 5221 | \tcode{true} if the specified relationship is true and \tcode{false} if it is
|
5223 | 5222 | false.
|
5224 | 5223 |
|
|
5235 | 5234 | \end{bnf}
|
5236 | 5235 |
|
5237 | 5236 | \pnum
|
5238 |
| -The usual arithmetic conversions are performed; the result is the |
| 5237 | +The usual arithmetic conversions\iref{expr.arith.conv} are performed; the result is the |
5239 | 5238 | bitwise \logop{AND} function of the operands. The operator
|
5240 | 5239 | applies only to integral or unscoped enumeration operands.
|
5241 | 5240 |
|
|
5251 | 5250 | \end{bnf}
|
5252 | 5251 |
|
5253 | 5252 | \pnum
|
5254 |
| -The usual arithmetic conversions are performed; the result is the |
| 5253 | +The usual arithmetic conversions\iref{expr.arith.conv} are performed; the result is the |
5255 | 5254 | bitwise exclusive \logop{OR} function of the operands. The
|
5256 | 5255 | operator applies only to integral or unscoped enumeration operands.
|
5257 | 5256 |
|
|
5267 | 5266 | \end{bnf}
|
5268 | 5267 |
|
5269 | 5268 | \pnum
|
5270 |
| -The usual arithmetic conversions are performed; the result is the |
| 5269 | +The usual arithmetic conversions\iref{expr.arith.conv} are performed; the result is the |
5271 | 5270 | bitwise inclusive \logop{OR} function of its operands. The
|
5272 | 5271 | operator applies only to integral or unscoped enumeration operands.
|
5273 | 5272 |
|
|
5470 | 5469 | that type and the result object is initialized using the selected operand.
|
5471 | 5470 |
|
5472 | 5471 | \item The second and third operands have arithmetic or enumeration type;
|
5473 |
| -the usual arithmetic conversions are performed to bring them to a common |
| 5472 | +the usual arithmetic conversions\iref{expr.arith.conv} are performed to bring them to a common |
5474 | 5473 | type, and the result is of that type.
|
5475 | 5474 |
|
5476 | 5475 | \item One or both of the second and third operands have pointer type;
|
|
0 commit comments