diff --git a/include/flatbuffers/vector.h b/include/flatbuffers/vector.h index ae52b9382..cd4858bb8 100644 --- a/include/flatbuffers/vector.h +++ b/include/flatbuffers/vector.h @@ -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 {