2021-01-05 22:04:24 +00:00
|
|
|
### Compilation failed:
|
|
|
|
|
|
|
|
error: 1: operator '~' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int bit_not(int x) { return ~x; }
|
|
|
|
^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 3: operator '%' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int remainder(int x) { return x % 2; }
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 4: operator '%=' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int remainder_eq(int x) { return x %= 2;}
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 6: operator '<<' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int shl (int x) { return x << 1; }
|
|
|
|
^^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 7: operator '<<=' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int shl_eq(int x) { return x <<= 1; }
|
|
|
|
^^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 8: operator '>>' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int shr (int x) { return x >> 1; }
|
|
|
|
^^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 9: operator '>>=' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int shr_eq(int x) { return x >>= 1; }
|
|
|
|
^^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 11: operator '&' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int bit_and (int x) { return x & 1; }
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 12: operator '&=' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int bit_and_eq(int x) { return x &= 1; }
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 13: operator '|' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int bit_or (int x) { return x | 1; }
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 14: operator '|=' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int bit_or_eq (int x) { return x |= 1; }
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 15: operator '^' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int bit_xor (int x) { return x ^ 1; }
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
error: 16: operator '^=' is not allowed
|
2022-04-06 22:24:52 +00:00
|
|
|
int bit_xor_eq(int x) { return x ^= 1; }
|
|
|
|
^^^^^^
|
2021-01-05 22:04:24 +00:00
|
|
|
13 errors
|