| 144 | // Returns true if the first range is lexicographically less than the second |
| 145 | template <typename Iterator1, typename Iterator2> |
| 146 | bool lexicographical_compare(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2) FL_NOEXCEPT { |
| 147 | while (first1 != last1 && first2 != last2) { |
| 148 | if (*first1 < *first2) { |
| 149 | return true; |
| 150 | } |
| 151 | if (*first2 < *first1) { |
| 152 | return false; |
| 153 | } |
| 154 | ++first1; |
| 155 | ++first2; |
| 156 | } |
| 157 | // If we've exhausted first1 but not first2, first1 is less |
| 158 | // If we've exhausted both, they're equal (return false) |
| 159 | // If we've exhausted first2 but not first1, first2 is less (return false) |
| 160 | return (first1 == last1) && (first2 != last2); |
| 161 | } |
| 162 | |
| 163 | // Lexicographical comparison with custom comparator |
| 164 | template <typename Iterator1, typename Iterator2, typename Compare> |
no outgoing calls
no test coverage detected