[LLVMdev] Patch to use correct namespace for 'find' in SetVector.h

Morten Ofstad morten at hue.no
Wed Oct 13 07:48:09 PDT 2004


I have no idea why this code compiled correctly with gcc...

m.

Index: include/llvm/ADT/SetVector.h
===================================================================
RCS file: /var/cvs/llvm/llvm/include/llvm/ADT/SetVector.h,v
retrieving revision 1.8
diff -u -r1.8 SetVector.h
--- include/llvm/ADT/SetVector.h        11 Sep 2004 20:38:25 -0000      1.8
+++ include/llvm/ADT/SetVector.h        13 Oct 2004 14:44:33 -0000
@@ -112,7 +112,7 @@
    /// @brief Remove an item from the set vector.
    void remove(const value_type& X) {
      if (0 < set_.erase(X)) {
-      iterator I = find(vector_.begin(),vector_.end(),X);
+      iterator I = std::find(vector_.begin(),vector_.end(),X);
        assert(I != vector_.end() && "Corrupted SetVector instances!");
        vector_.erase(I);
      }




More information about the llvm-dev mailing list