Add more operators. (#8309)

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Ben J
2024-05-28 21:07:34 -04:00
committed by GitHub
parent 299725fe2e
commit 30ae5f189c

View File

@@ -56,12 +56,24 @@ struct VectorIterator {
return data_ == other.data_;
}
bool operator!=(const VectorIterator &other) const {
return data_ != other.data_;
}
bool operator<(const VectorIterator &other) const {
return data_ < other.data_;
}
bool operator!=(const VectorIterator &other) const {
return data_ != other.data_;
bool operator>(const VectorIterator &other) const {
return data_ > other.data_;
}
bool operator<=(const VectorIterator &other) const {
return !(data_ > other.data_);
}
bool operator>=(const VectorIterator &other) const {
return !(data_ < other.data_);
}
difference_type operator-(const VectorIterator &other) const {