C++ fixed compile error C2678 with msvc when using std::find_if on vectors (#4262)
In Debug mode it is checked that iterator begin is less than end
therefore the operator< in class VectorIterator is needed
diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h
index 9fc2236..664be4c 100644
--- a/include/flatbuffers/flatbuffers.h
+++ b/include/flatbuffers/flatbuffers.h
@@ -296,6 +296,10 @@
return data_ == other.data_;
}
+ bool operator<(const VectorIterator &other) const {
+ return data_ < other.data_;
+ }
+
bool operator!=(const VectorIterator &other) const {
return data_ != other.data_;
}