utils/chunked_managed_vector: use operator<=> when appropriate

instead of crafting 4 operators manually, just delegate it to <=>.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #13698
This commit is contained in:
Kefu Chai
2023-04-28 10:47:03 +08:00
committed by Botond Dénes
parent 0b5d9d94fa
commit 43e9910fa0

View File

@@ -240,17 +240,8 @@ public:
bool operator==(iterator_type x) const {
return _i == x._i;
}
bool operator<(iterator_type x) const {
return _i < x._i;
}
bool operator<=(iterator_type x) const {
return _i <= x._i;
}
bool operator>(iterator_type x) const {
return _i > x._i;
}
bool operator>=(iterator_type x) const {
return _i >= x._i;
std::strong_ordering operator<=>(iterator_type x) const {
return _i <=> x._i;
}
friend class chunked_managed_vector;
};