| 645 | } |
| 646 | |
| 647 | bool operator<(const list& other) const { |
| 648 | for (const_iterator it1 = begin(), it2 = other.begin(); |
| 649 | it1 != end() && it2 != other.end(); ++it1, ++it2) { |
| 650 | if (*it1 < *it2) { |
| 651 | return true; |
| 652 | } |
| 653 | if (*it1 > *it2) { |
| 654 | return false; |
| 655 | } |
| 656 | } |
| 657 | return mSize < other.mSize; |
| 658 | } |
| 659 | |
| 660 | bool operator<=(const list& other) const { |
| 661 | return *this < other || *this == other; |