From Jason Turner

[expr.shift]

Diff to HTML by rtfpessoa

tmp/tmps9yelyga/{from.md → to.md} RENAMED
@@ -7,23 +7,24 @@ shift-expression:
7
  additive-expression
8
  shift-expression '<<' additive-expression
9
  shift-expression '>>' additive-expression
10
  ```
11
 
12
- The operands shall be of integral or unscoped enumeration type and
13
- integral promotions are performed. The type of the result is that of the
14
- promoted left operand. The behavior is undefined if the right operand is
15
- negative, or greater than or equal to the width of the promoted left
16
- operand.
17
 
18
  The value of `E1 << E2` is the unique value congruent to `E1` × 2^`E2`
19
  modulo 2ᴺ, where N is the width of the type of the result.
20
 
21
  [*Note 1*: `E1` is left-shifted `E2` bit positions; vacated bits are
22
  zero-filled. — *end note*]
23
 
24
- The value of `E1 >> E2` is `E1` / 2^`E2`, rounded down.
 
25
 
26
  [*Note 2*: `E1` is right-shifted `E2` bit positions. Right-shift on
27
  signed integral types is an arithmetic right shift, which performs
28
  sign-extension. — *end note*]
29
 
 
7
  additive-expression
8
  shift-expression '<<' additive-expression
9
  shift-expression '>>' additive-expression
10
  ```
11
 
12
+ The operands shall be prvalues of integral or unscoped enumeration type
13
+ and integral promotions are performed. The type of the result is that of
14
+ the promoted left operand. The behavior is undefined if the right
15
+ operand is negative, or greater than or equal to the width of the
16
+ promoted left operand.
17
 
18
  The value of `E1 << E2` is the unique value congruent to `E1` × 2^`E2`
19
  modulo 2ᴺ, where N is the width of the type of the result.
20
 
21
  [*Note 1*: `E1` is left-shifted `E2` bit positions; vacated bits are
22
  zero-filled. — *end note*]
23
 
24
+ The value of `E1 >> E2` is `E1` / 2^`E2`, rounded towards negative
25
+ infinity.
26
 
27
  [*Note 2*: `E1` is right-shifted `E2` bit positions. Right-shift on
28
  signed integral types is an arithmetic right shift, which performs
29
  sign-extension. — *end note*]
30