 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
The
return type of overloaded operators is also defined the
|
|
same
as it is for overloaded functions.
|
|
| • |
The
value returned from an overloaded operator is the
|
|
|
residual
value of the expression containing that operator
|
|
|
and
its operands.
|
|
| • |
It
is extremely important that we pay close attention to the
|
|
|
type
and value returned.
|
|
| • |
It
is the returned value that allows an operator to be used
|
|
|
within
a larger expression.
|
|
| • |
It
allows the result of some operation to become the
|
|
|
operand
for another operator.
|
|
| • |
A
return type of void would render an operator useless
|
|
|
when
used within an expression. (I suggest that we never
|
|
|
have
an operator return void!)
|
|