
14 Expressions
14.6 Unary expressions
14.6.4 Bitwise complement operator
Paragraph 11 For an operation of the form ~x, unary operator overload resolution (§14.2.3) is applied to select a specific operator implementation. 2 The operand is converted to the parameter type of the selected operator, and the type of the result is the return type of the operator. 3 The predefined bitwise complement operators are: int operator ~(int x); uint operator ~(uint x); long operator ~(long x); ulong operator ~(ulong x);Paragraph 21 For each of these operators, the result of the operation is the bitwise complement of x. Paragraph 31 Every enumeration type E implicitly provides the following bitwise complement operator:
E operator ~(E x);Paragraph 41 The result of evaluating ~x, where x is an expression of an enumeration type E with an underlying type U, is exactly the same as evaluating (E)(~(U)x).
| |
| Jagger Software Ltd | |
| Company # 4070126 | |
| VAT # 762 5213 42 |