FastLED 3.9.15
Loading...
Searching...
No Matches

◆ lexicographical_compare() [2/2]

template<typename Iterator1, typename Iterator2, typename Compare>
bool fl::lexicographical_compare ( Iterator1 first1,
Iterator1 last1,
Iterator2 first2,
Iterator2 last2,
Compare comp )

Definition at line 165 of file algorithm.h.

165 {
166 while (first1 != last1 && first2 != last2) {
167 if (comp(*first1, *first2)) {
168 return true;
169 }
170 if (comp(*first2, *first1)) {
171 return false;
172 }
173 ++first1;
174 ++first2;
175 }
176 // If we've exhausted first1 but not first2, first1 is less
177 // If we've exhausted both, they're equal (return false)
178 // If we've exhausted first2 but not first1, first2 is less (return false)
179 return (first1 == last1) && (first2 != last2);
180}

References FL_NOEXCEPT.