summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-11 18:15:46 +0000
committerChris Lattner <sabre@nondot.org>2009-09-11 18:15:46 +0000
commit724f6751442e2006856a9365ef3d3bc6f1b31c98 (patch)
tree08795d64fd8ab1097c44cf968582782621c33834 /include
parentf2f6ce65b79df6ec4ee427d51a18355a170f199b (diff)
downloadllvm-724f6751442e2006856a9365ef3d3bc6f1b31c98.tar.gz
llvm-724f6751442e2006856a9365ef3d3bc6f1b31c98.tar.bz2
llvm-724f6751442e2006856a9365ef3d3bc6f1b31c98.tar.xz
give densemap iterators real iterator traits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/DenseMap.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h
index b220714b36..daeda28d12 100644
--- a/include/llvm/ADT/DenseMap.h
+++ b/include/llvm/ADT/DenseMap.h
@@ -17,10 +17,11 @@
#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;