disable broken tests on net_4_0
[mcs.git] / docs / ecma334 / 14.6.4.xml
blob4d54eaa12e6452a4ecaba3cfe74d4d03659b347f
1 <?xml version="1.0"?>
2 <clause number="14.6.4" title="Bitwise complement operator">
3   <paragraph>For an operation of the form ~x, unary operator overload resolution (<hyperlink>14.2.3</hyperlink>) is applied to select a specific operator implementation. 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. The predefined bitwise complement operators are: <code_example><![CDATA[
4 int operator ~(int x);  
5 uint operator ~(uint x);  
6 long operator ~(long x);  
7 ulong operator ~(ulong x);  
8 ]]></code_example></paragraph>
9   <paragraph>For each of these operators, the result of the operation is the bitwise complement of x. </paragraph>
10   <paragraph>Every enumeration type E implicitly provides the following bitwise complement operator: <code_example><![CDATA[
11 E operator ~(E x);  
12 ]]></code_example></paragraph>
13   <paragraph>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). </paragraph>
14 </clause>