diff --git a/lib/enumerator.h b/lib/enumerator.h index daeb477f2c..7c5ff5d9f0 100644 --- a/lib/enumerator.h +++ b/lib/enumerator.h @@ -60,6 +60,7 @@ class EnumeratorHandle { reference operator*() const; const EnumeratorHandle &operator++(); + bool operator==(const EnumeratorHandle &other) const; bool operator!=(const EnumeratorHandle &other) const; }; @@ -630,6 +631,11 @@ const EnumeratorHandle &EnumeratorHandle::operator++() { return *this; } +template +bool EnumeratorHandle::operator==(const EnumeratorHandle &other) const { + return !(*this != other); +} + template bool EnumeratorHandle::operator!=(const EnumeratorHandle &other) const { if (this->enumerator == other.enumerator) return true;