From Jason Turner

[expr.xor]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp9hoybgyd/{from.md → to.md} +11 -4
tmp/tmp9hoybgyd/{from.md → to.md} RENAMED
@@ -1,12 +1,19 @@
1
- ## Bitwise exclusive OR operator <a id="expr.xor">[[expr.xor]]</a>
2
 
3
  ``` bnf
4
  exclusive-or-expression:
5
  and-expression
6
  exclusive-or-expression '^' and-expression
7
  ```
8
 
9
- The usual arithmetic conversions are performed; the result is the
10
- bitwise exclusive function of the operands. The operator applies only to
11
- integral or unscoped enumeration operands.
 
 
 
 
 
 
 
12
 
 
1
+ ### Bitwise exclusive OR operator <a id="expr.xor">[[expr.xor]]</a>
2
 
3
  ``` bnf
4
  exclusive-or-expression:
5
  and-expression
6
  exclusive-or-expression '^' and-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 either (but not both) of `xᵢ` and `yᵢ` are 1,
15
+ and 0 otherwise.
16
+
17
+ [*Note 1*: The result is the bitwise exclusive function of the
18
+ operands. — *end note*]
19