mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
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
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
e6fa7b1133
commit
1fc12e0e5b
@@ -296,6 +296,10 @@ public:
|
||||
return data_ == other.data_;
|
||||
}
|
||||
|
||||
bool operator<(const VectorIterator &other) const {
|
||||
return data_ < other.data_;
|
||||
}
|
||||
|
||||
bool operator!=(const VectorIterator &other) const {
|
||||
return data_ != other.data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user