 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
We cannot
change the....
|
|
|
|
– |
number
of operands an operator expects
|
|
|
|
– |
precedence
and associativity of operators
|
|
|
|
– |
or
use default arguments with operators
|
|
|
| • |
We should
not change...
|
|
|
|
– |
the
meaning of the operator
|
|
|
|
(+
does not mean subtraction!)
|
|
|
|
– |
the
nature of the operator (3+4 == 4+3)
|
|
|
|
– |
the
data types and residual value expected
|
|
|
|
– |
whether
it is an rvalued or lvalued result
|
|
|
|
– |
provide
consistent definitions (if + is
overloaded, then +=
|
|
should
also be)
|
|