July 2000
Intermediate to advanced
1280 pages
34h 55m
English
These two operators are binary operators, but they are quite different from other C++ overloaded binary operators in how the client call to the operator is converted to a binary expression. For other overloaded operators, the target of the message is used as the left operand in the expression, with the operator (from the method name) inserted between the right and the left operand and the parameter of the function call used as the right operand of the expression. This is not so with the subscript and function call operators. (You will see the examples soon.)
Another difference is that these overloaded operators can be implemented as class members only—they cannot be implemented as global nonmember functions. ...
Read now
Unlock full access