The following restrictions apply to operator overloading:
1. Invention of new operators is not allowed. For example:
void operator @ (int) ; //illegal, @ is not a built-in operator or a type name
2. Neither the precedence nor the number of arguments of an operator may be altered. An overloaded && for example, must have exactly two arguments--just like the built-in && operator.
3. The following operators cannot be overloaded:
Direct member access operator .
De-reference pointer to class member operator .*
Scope resolution operator ::
Conditional operator ?:
Sizeof operator sizeof
Similarly, any of the new casting operators: static_cast<>, dynamic_cast<>, reinterpret_cast<> and const_cast<>, as well as the # and ## preprocessor tokens, may not be overloaded.