implement more compares to make range halves conformant random/bidirectional iterators

master
Daniel Kolesa 2017-03-11 14:24:41 +01:00
parent 9c9221822a
commit 64e699a2d2
1 changed files with 12 additions and 0 deletions

View File

@ -423,6 +423,18 @@ public:
bool operator!=(range_half const &half) const {
return !equals(half);
}
bool operator<(range_half const &half) const {
return distance(half) > 0;
}
bool operator>(range_half const &half) const {
return distance(half) < 0;
}
bool operator<=(range_half const &half) const {
return distance(half) >= 0;
}
bool operator>=(range_half const &half) const {
return distance(half) <= 0;
}
/* iterator like interface */