[PATCH] Define iterator_traits for ImmutableSet::iterator

Ryan Govostes rgovostes+git at gmail.com
Tue Feb 12 18:20:01 PST 2013


http://llvm-reviews.chandlerc.com/D401

Files:
  include/llvm/ADT/ImmutableSet.h

Index: include/llvm/ADT/ImmutableSet.h
===================================================================
--- include/llvm/ADT/ImmutableSet.h
+++ include/llvm/ADT/ImmutableSet.h
@@ -1066,6 +1066,12 @@
     inline bool operator==(const iterator& RHS) const { return RHS.itr == itr; }
     inline bool operator!=(const iterator& RHS) const { return RHS.itr != itr; }
     inline value_type *operator->() const { return &(operator*()); }
+
+    typedef int difference_type;
+    typedef ImmutableSet<ValT,ValInfo>::value_type value_type;
+    typedef value_type *pointer;
+    typedef value_type &reference;
+    typedef std::bidirectional_iterator_tag iterator_category;
   };
 
   iterator begin() const { return iterator(Root); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D401.1.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130212/6297bf51/attachment.bin>


More information about the llvm-commits mailing list