|
1323 | 1323 |
|
1324 | 1324 | \begin{bnf}
|
1325 | 1325 | \nontermdef{fold-operator} \textnormal{one of}\br
|
1326 |
| - \terminal{+ }\quad\terminal{- }\quad\terminal{* }\quad\terminal{/ }\quad\terminal{\% }\quad\terminal{\caret }\quad\terminal{\& }\quad\terminal{| }\quad\terminal{\shl\ }\quad\terminal{\shr }\br |
1327 |
| - \terminal{+=}\quad\terminal{-=}\quad\terminal{*=}\quad\terminal{/=}\quad\terminal{\%=}\quad\terminal{\caret=}\quad\terminal{\&=}\quad\terminal{|=}\quad\terminal{\shl=}\quad\terminal{\shr=}\quad\terminal{=}\br |
| 1326 | + \terminal{+ }\quad\terminal{- }\quad\terminal{* }\quad\terminal{/ }\quad\terminal{\% }\quad\terminal{\caret }\quad\terminal{\& }\quad\terminal{| }\quad\terminal{<< }\quad\terminal{>> }\br |
| 1327 | + \terminal{+=}\quad\terminal{-=}\quad\terminal{*=}\quad\terminal{/=}\quad\terminal{\%=}\quad\terminal{\caret=}\quad\terminal{\&=}\quad\terminal{|=}\quad\terminal{<<=}\quad\terminal{>>=}\quad\terminal{=}\br |
1328 | 1328 | \terminal{==}\quad\terminal{!=}\quad\terminal{< }\quad\terminal{> }\quad\terminal{<=}\quad\terminal{>=}\quad\terminal{\&\&}\quad\terminal{||}\quad\terminal{, }\quad\terminal{.* }\quad\terminal{->*}
|
1329 | 1329 | \end{bnf}
|
1330 | 1330 |
|
|
4104 | 4104 | \indextext{shift operator|see{operator, left shift; operator, right shift}}%
|
4105 | 4105 | \indextext{right shift operator|see{operator, right shift}}%
|
4106 | 4106 | \indextext{left shift operator|see{operator, left shift}}%
|
4107 |
| -The shift operators \tcode{\shl} and \tcode{\shr} group left-to-right. |
| 4107 | +The shift operators \tcode{<<} and \tcode{>>} group left-to-right. |
4108 | 4108 |
|
4109 | 4109 | \indextext{operator!left shift}%
|
4110 |
| -\indextext{\idxcode{\shl}|see{operator, left shift}}% |
| 4110 | +\indextext{\idxcode{<<}|see{operator, left shift}}% |
4111 | 4111 | \indextext{operator!right shift}%
|
4112 |
| -\indextext{\idxcode{\shr}|see{operator, right shift}}% |
| 4112 | +\indextext{\idxcode{>>}|see{operator, right shift}}% |
4113 | 4113 | %
|
4114 | 4114 | \begin{bnf}
|
4115 | 4115 | \nontermdef{shift-expression}\br
|
4116 | 4116 | additive-expression\br
|
4117 |
| - shift-expression \terminal{\shl} additive-expression\br |
4118 |
| - shift-expression \terminal{\shr} additive-expression |
| 4117 | + shift-expression \terminal{<<} additive-expression\br |
| 4118 | + shift-expression \terminal{>>} additive-expression |
4119 | 4119 | \end{bnf}
|
4120 | 4120 |
|
4121 | 4121 | The operands shall be of integral or unscoped enumeration type and integral
|
|
4126 | 4126 | than or equal to the length in bits of the promoted left operand.
|
4127 | 4127 |
|
4128 | 4128 | \pnum
|
4129 |
| -The value of \tcode{E1 \shl\ E2} is \tcode{E1} left-shifted \tcode{E2} bit positions; vacated bits are |
| 4129 | +The value of \tcode{E1 << E2} is \tcode{E1} left-shifted \tcode{E2} bit positions; vacated bits are |
4130 | 4130 | zero-filled. If \tcode{E1} has an unsigned type, the value of the result
|
4131 | 4131 | is $\mathrm{E1}\times2^\mathrm{E2}$, reduced modulo
|
4132 | 4132 | one more than the maximum value representable in the result type. Otherwise, if
|
|
4136 | 4136 | behavior is undefined.
|
4137 | 4137 |
|
4138 | 4138 | \pnum
|
4139 |
| -The value of \tcode{E1 \shr\ E2} is \tcode{E1} right-shifted \tcode{E2} |
| 4139 | +The value of \tcode{E1 >> E2} is \tcode{E1} right-shifted \tcode{E2} |
4140 | 4140 | bit positions. If \tcode{E1} has an unsigned type or if \tcode{E1} has a
|
4141 | 4141 | signed type and a non-negative value, the value of the result is the
|
4142 | 4142 | integral part of the quotient of $\mathrm{E1}/2^\mathrm{E2}$. If \tcode{E1}
|
|
4692 | 4692 | \indextext{operator!\idxcode{*=}}%
|
4693 | 4693 | \indextext{operator!\idxcode{/=}}%
|
4694 | 4694 | \indextext{operator!\idxcode{\%=}}%
|
4695 |
| -\indextext{operator!\idxcode{\shr=}}% |
4696 |
| -\indextext{operator!\idxcode{\shl=}}% |
| 4695 | +\indextext{operator!\idxcode{>>=}}% |
| 4696 | +\indextext{operator!\idxcode{<<=}}% |
4697 | 4697 | \indextext{operator!\idxcode{\&=}}%
|
4698 | 4698 | \indextext{operator!\idxcode{\caret=}}%
|
4699 | 4699 | \indextext{operator!\idxcode{"|=}}%
|
|
4728 | 4728 |
|
4729 | 4729 | \begin{bnf}
|
4730 | 4730 | \nontermdef{assignment-operator} \textnormal{one of}\br
|
4731 |
| - \terminal{= *= /= \%= += -= \shr= \shl= \&= \caret= |=} |
| 4731 | + \terminal{= *= /= \%= += -= >>= <<= \&= \caret= |=} |
4732 | 4732 | \end{bnf}
|
4733 | 4733 |
|
4734 | 4734 | \pnum
|
|
0 commit comments