Advanced Topic 17.2
Symmetry and Conversion
- Arithmetic and comparison operators are generally nonmember
functions
- No implicit conversions of left operand for member functions:
Consider Fraction a;
- ( a == 2 ) works fine (given the constructors)
- ( 2 == a ) will not work if equality is a member
function.
prev
|top
|next