From 71dae1f1ba89c2d4a8755229b407fede68f2678c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 8 Jul 2009 23:53:54 +0000 Subject: [PATCH] Make SmallPtrSet iterators real iterators llvm-svn: 75073 --- include/llvm/ADT/SmallPtrSet.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index a189de2c227..7d00e9a073e 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -17,6 +17,7 @@ #include #include +#include #include "llvm/Support/DataTypes.h" #include "llvm/Support/PointerLikeTypeTraits.h" @@ -170,7 +171,14 @@ protected: template class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { typedef PointerLikeTypeTraits 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) {}