The following unary operator functions are unsupported:
int operator ~(C &X) { return 1; } int tilda (C &X) { return 1; } if (~c != tilda(c)) ----- -----^----------------------------ERROR: Integer-operand expected
class A{}; int operator!(A &X) { return 1; } int bang_(A &X) { return 1; } A a; if ((!a) != (bang_(a))) ---------^--------ERROR : Arithmetic type or pointer expected
class X { public: operator int() {i = 1; return 1;} } x; (void) (0 || x); -----------^------------ERROR
int x = 1; int a = 2; int b = 3; x?a:b = 1; -------------^------------------ERROR
(i = 2) = 3; -------------^-------- The result of the = operator shall be an lvalue (i *= 2) = 3; -------------^-------- The result of the *= operator shall be an lvalue (i += 5) = 3; -------------^-------- The result of the += operator shall be an lvalue