The Comparison Operators
bool operator < (const rational & left, const rational & right)
{ // less than comparison of two rational numbersreturn left.numerator() * right.denominator() < right.numerator() * left.denominator();
// define greater than in terms of less than
bool operator > (T & left, T & right) { return right < left; }