[llvm-commits] [llvm] r81538 - /llvm/trunk/include/llvm/ADT/DenseMap.h
Chris Lattner
sabre at nondot.org
Fri Sep 11 11:15:48 PDT 2009
Author: lattner
Date: Fri Sep 11 13:15:46 2009
New Revision: 81538
URL: http://llvm.org/viewvc/llvm-project?rev=81538&view=rev
Log:
give densemap iterators real iterator traits.
Modified:
llvm/trunk/include/llvm/ADT/DenseMap.h
Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=81538&r1=81537&r2=81538&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Fri Sep 11 13:15:46 2009
@@ -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 @@
};
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;
More information about the llvm-commits
mailing list