give densemap iterators real iterator traits.
authorChris Lattner <sabre@nondot.org>
Fri, 11 Sep 2009 18:15:46 +0000 (18:15 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 11 Sep 2009 18:15:46 +0000 (18:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81538 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/DenseMap.h

index b220714b36cabb7cc5a73dc9f040f974f4a47073..daeda28d1298d535b701b6aa559e2bd706aaf993 100644 (file)
 #include "llvm/Support/PointerLikeTypeTraits.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/ADT/DenseMapInfo.h"
+#include <iterator>
+#include <new>
+#include <utility>
 #include <cassert>
 #include <cstring>
-#include <utility>
-#include <new>
 
 namespace llvm {
 
@@ -423,7 +424,9 @@ private:
 };
 
 template<typename KeyT, typename ValueT, typename KeyInfoT, typename ValueInfoT>
-class DenseMapIterator {
+class DenseMapIterator : 
+      public std::iterator<std::forward_iterator_tag, std::pair<KeyT, ValueT>,
+                          ptrdiff_t> {
   typedef std::pair<KeyT, ValueT> BucketT;
 protected:
   const BucketT *Ptr, *End;