forked from dlang/dmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd1_style_operators.dd
62 lines (54 loc) · 4.14 KB
/
d1_style_operators.dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
The deprecation period for D1-style operators has ended.
Starting with this release, any use of the deprecated D1 overload operators
will result in a compiler error.
The corrective action is to replace all operators with their D2 equivalent.
The following D1 operator overloads have been removed in favor of `opUnary`:
* `opNeg` must be replaced with `opUnary(string op)() if (op == "-")`
* `opCom` must be replaced with `opUnary(string op)() if (op == "~")`
* `opPostInc`must be replaced with `opUnary(string op)() if (op == "++")`
* `opPostDec`must be replaced with `opUnary(string op)() if (op == "--")`
* `opStar`must be replaced with `opUnary(string op)() if (op == "*")`
The following D1 operator overloads have been removed in favor of `opBinary`:
* `opAdd` must be replaced with `opBinary(string op)(...) if (op == "+")`
* `opSub` must be replaced with `opBinary(string op)(...) if (op == "-")`
* `opMul` must be replaced with `opBinary(string op)(...) if (op == "*")`
* `opDiv` must be replaced with `opBinary(string op)(...) if (op == "/")`
* `opMod` must be replaced with `opBinary(string op)(...) if (op == "%")`
* `opAnd` must be replaced with `opBinary(string op)(...) if (op == "&")`
* `opXor` must be replaced with `opBinary(string op)(...) if (op == "^")`
* `opOr` must be replaced with `opBinary(string op)(...) if (op == "|")`
* `opShl` must be replaced with `opBinary(string op)(...) if (op == "<<")`
* `opShr` must be replaced with `opBinary(string op)(...) if (op == ">>")`
* `opUShr` must be replaced with `opBinary(string op)(...) if (op == ">>>")`
* `opCat` must be replaced with `opBinary(string op)(...) if (op == "~")`
* `opIn` must be replaced with `opBinary(string op)(...) if (op == "in")`
The following D1 operator overloads have been removed in favor of `opBinaryRight`:
* `opAdd_r` must be replaced with `opBinaryRight(string op)(...) if (op == "+")`
* `opSub_r` must be replaced with `opBinaryRight(string op)(...) if (op == "-")`
* `opMul_r` must be replaced with `opBinaryRight(string op)(...) if (op == "*")`
* `opDiv_r` must be replaced with `opBinaryRight(string op)(...) if (op == "/")`
* `opMod_r` must be replaced with `opBinaryRight(string op)(...) if (op == "%")`
* `opAnd_r` must be replaced with `opBinaryRight(string op)(...) if (op == "&")`
* `opXor_r` must be replaced with `opBinaryRight(string op)(...) if (op == "^")`
* `opOr_r` must be replaced with `opBinaryRight(string op)(...) if (op == "|")`
* `opShl_r` must be replaced with `opBinaryRight(string op)(...) if (op == "<<")`
* `opShr_r` must be replaced with `opBinaryRight(string op)(...) if (op == ">>")`
* `opUShr_r` must be replaced with `opBinaryRight(string op)(...) if (op == ">>>")`
* `opCat_r` must be replaced with `opBinaryRight(string op)(...) if (op == "~")`
* `opIn_r` must be replaced with `opBinaryRight(string op)(...) if (op == "in")`
Note: The `opBinaryRight` overload operator takes precedence over any `opBinary` operators.
The following D1 operator overloads have been removed in favor of `opOpAssign`:
* `opAddAssign` must be replaced with `opOpAssign(string op)(...) if (op == "+")`
* `opSubAssign` must be replaced with `opOpAssign(string op)(...) if (op == "-")`
* `opMulAssign` must be replaced with `opOpAssign(string op)(...) if (op == "*")`
* `opDivAssign` must be replaced with `opOpAssign(string op)(...) if (op == "/")`
* `opModAssign` must be replaced with `opOpAssign(string op)(...) if (op == "%")`
* `opAndAssign` must be replaced with `opOpAssign(string op)(...) if (op == "&")`
* `opOrAssign` must be replaced with `opOpAssign(string op)(...) if (op == "|")`
* `opXorAssign` must be replaced with `opOpAssign(string op)(...) if (op == "^")`
* `opShlAssign` must be replaced with `opOpAssign(string op)(...) if (op == "<<")`
* `opShrAssign` must be replaced with `opOpAssign(string op)(...) if (op == ">>")`
* `opUShrAssign` must be replaced with `opOpAssign(string op)(...) if (op == ">>>")`
* `opCatAssign` must be replaced with `opOpAssign(string op)(...) if (op == "~")`
The following D1 operator overloads have been removed in favor of `alias this`:
* `opDot` must be replaced with `alias this`