]> granicus.if.org Git - clang/commitdiff
Attempt to fix the MSVC build by making ExprIterator
authorSean Callanan <scallanan@apple.com>
Tue, 28 Apr 2015 21:18:01 +0000 (21:18 +0000)
committerSean Callanan <scallanan@apple.com>
Tue, 28 Apr 2015 21:18:01 +0000 (21:18 +0000)
inherit correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236035 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Stmt.h

index 445cd849fcbc8eb9766ff90ddd427ff67e60c908..ce9449dc46f69b5e6f0c01ef64e9d0e29416e578 100644 (file)
@@ -58,7 +58,9 @@ namespace clang {
   class Stmt;
   class Expr;
 
-  class ExprIterator {
+  class ExprIterator : public std::iterator<std::forward_iterator_tag,
+                                            Expr *&, ptrdiff_t,
+                                            Expr *&, Expr *&> {
     Stmt** I;
   public:
     ExprIterator(Stmt** i) : I(i) {}
@@ -77,7 +79,10 @@ namespace clang {
     bool operator>=(const ExprIterator& R) const { return I >= R.I; }
   };
 
-  class ConstExprIterator {
+  class ConstExprIterator : public std::iterator<std::forward_iterator_tag,
+                                                 const Expr *&, ptrdiff_t,
+                                                 const Expr *&,
+                                                 const Expr *&> {
     const Stmt * const *I;
   public:
     ConstExprIterator(const Stmt * const *i) : I(i) {}