
379
Appendix D: Operator
Overloading
D.1 ABSTRACTING FUNCTIONALITY
Operator overloading supports the denition of functions that may be
invoked via a built-in operator, such as “+”. When used in an expression, a
symbol (or operator), such as “+”, is interpreted by the compiler as a func-
tion call. e compiler automatically patches in the operands as param-
eters to the function call. Using operators, a programmer can represent
actions, or operations, in a concise, intuitive, and readable fashion. Since
most operators can be applied to multiple types, and each type may have a
dierent implementation of an operator, operators are “overloaded.