add operator == for TEnumIterator
diff --git a/lib/cpp/src/thrift/Thrift.h b/lib/cpp/src/thrift/Thrift.h
index d5066ee..55511d6 100644
--- a/lib/cpp/src/thrift/Thrift.h
+++ b/lib/cpp/src/thrift/Thrift.h
@@ -58,7 +58,11 @@
 
   int operator++() { return ++ii_; }
 
-  bool operator!=(const TEnumIterator& end) {
+  bool operator==(const TEnumIterator& rhs) const {
+    return ii_ == rhs.ii_ && n_ == rhs.n_;
+  }
+
+  bool operator!=(const TEnumIterator& end) const {
     THRIFT_UNUSED_VARIABLE(end);
     assert(end.n_ == -1);
     return (ii_ != n_);
diff --git a/lib/cpp/src/thrift/windows/Operators.h b/lib/cpp/src/thrift/windows/Operators.h
index 9b86096..406e11e 100644
--- a/lib/cpp/src/thrift/windows/Operators.h
+++ b/lib/cpp/src/thrift/windows/Operators.h
@@ -29,11 +29,6 @@
 
 class TEnumIterator;
 
-inline bool operator==(const TEnumIterator&, const TEnumIterator&) {
-  // Not entirely sure what the test should be here. It is only to enable
-  // iterator debugging and is not used in release mode.
-  return true;
-}
 }
 } // apache::thrift