From Jason Turner

[expr.or]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpnhky9vov/{from.md → to.md} +11 -4
tmp/tmpnhky9vov/{from.md → to.md} RENAMED
@@ -1,12 +1,19 @@
1
- ## Bitwise inclusive OR operator <a id="expr.or">[[expr.or]]</a>
2
 
3
  ``` bnf
4
  inclusive-or-expression:
5
  exclusive-or-expression
6
  inclusive-or-expression '|' exclusive-or-expression
7
  ```
8
 
9
- The usual arithmetic conversions are performed; the result is the
10
- bitwise inclusive function of its operands. The operator applies only to
11
- integral or unscoped enumeration operands.
 
 
 
 
 
 
 
12
 
 
1
+ ### Bitwise inclusive OR operator <a id="expr.or">[[expr.or]]</a>
2
 
3
  ``` bnf
4
  inclusive-or-expression:
5
  exclusive-or-expression
6
  inclusive-or-expression '|' exclusive-or-expression
7
  ```
8
 
9
+ The `|` operator groups left-to-right. The operands shall be of integral
10
+ or unscoped enumeration type. The usual arithmetic conversions
11
+ [[expr.arith.conv]] are performed. Given the coefficients `xᵢ` and `yᵢ`
12
+ of the base-2 representation [[basic.fundamental]] of the converted
13
+ operands `x` and `y`, the coefficient `rᵢ` of the base-2 representation
14
+ of the result `r` is 1 if at least one of `xᵢ` and `yᵢ` are 1, and 0
15
+ otherwise.
16
+
17
+ [*Note 1*: The result is the bitwise inclusive function of the
18
+ operands. — *end note*]
19