Lexicographic comparison
| 294 | |
| 295 | /// Lexicographic comparison |
| 296 | bool operator<(const circular_buffer& other) const { |
| 297 | fl::size min_size = (size() < other.size()) ? size() : other.size(); |
| 298 | for (fl::size i = 0; i < min_size; ++i) { |
| 299 | if (mCore[i] < other.mCore[i]) return true; |
| 300 | if (other.mCore[i] < mCore[i]) return false; |
| 301 | } |
| 302 | return size() < other.size(); |
| 303 | } |
| 304 | |
| 305 | /// Less-than-or-equal comparison |
| 306 | bool operator<=(const circular_buffer& other) const { |