[llvm-commits] [llvm] r75073 - /llvm/trunk/include/llvm/ADT/SmallPtrSet.h
Douglas Gregor
dgregor at apple.com
Wed Jul 8 16:53:55 PDT 2009
Author: dgregor
Date: Wed Jul 8 18:53:54 2009
New Revision: 75073
URL: http://llvm.org/viewvc/llvm-project?rev=75073&view=rev
Log:
Make SmallPtrSet iterators real iterators
Modified:
llvm/trunk/include/llvm/ADT/SmallPtrSet.h
Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=75073&r1=75072&r2=75073&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Wed Jul 8 18:53:54 2009
@@ -17,6 +17,7 @@
#include <cassert>
#include <cstring>
+#include <iterator>
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
@@ -170,7 +171,14 @@
template<typename PtrTy>
class SmallPtrSetIterator : public SmallPtrSetIteratorImpl {
typedef PointerLikeTypeTraits<PtrTy> PtrTraits;
+
public:
+ typedef PtrTy value_type;
+ typedef PtrTy reference;
+ typedef PtrTy pointer;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::forward_iterator_tag iterator_category;
+
explicit SmallPtrSetIterator(const void *const *BP)
: SmallPtrSetIteratorImpl(BP) {}
More information about the llvm-commits
mailing list