Implement operator== and operator!= for SetVector.
authorDan Gohman <gohman@apple.com>
Sat, 5 Jun 2010 00:26:02 +0000 (00:26 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 5 Jun 2010 00:26:02 +0000 (00:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105508 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SetVector.h

index fab133af4c03b1b49b4ae033278bb0d44b6b70dd..bf8286c1d840618d3c06a0eb21a4f0456123824a 100644 (file)
@@ -143,6 +143,14 @@ public:
     vector_.pop_back();
   }
 
+  bool operator==(const SetVector &that) const {
+    return vector_ == that.vector_;
+  }
+
+  bool operator!=(const SetVector &that) const {
+    return vector_ != that.vector_;
+  }
+
 private:
   set_type set_;         ///< The set.
   vector_type vector_;   ///< The vector.