forked from OctaForge/libostd
implement more compares to make range halves conformant random/bidirectional iterators
This commit is contained in:
parent
9c9221822a
commit
64e699a2d2
|
@ -423,6 +423,18 @@ public:
|
||||||
bool operator!=(range_half const &half) const {
|
bool operator!=(range_half const &half) const {
|
||||||
return !equals(half);
|
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 */
|
/* iterator like interface */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue