17.4 Overloading Comparison Operators
Similar to the arithmetic operators
Not
supplied automatically
Typically return a
bool
E.g.:
Time
s are equal <=> difference is 0
bool operator==(const Time& a, const Time& b) { return a.seconds_from(b) == 0; }
prev
|
top
|
next