From: Benjamin Kramer Date: Mon, 4 Nov 2013 10:29:56 +0000 (+0000) Subject: Make ADLResult::iterator a proper iterator. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f09c6a10e000ddc386a39bfd96734ba2d5a135e2;p=clang Make ADLResult::iterator a proper iterator. PR17796. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193986 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h index d09510622a..105c8791e2 100644 --- a/include/clang/Sema/Lookup.h +++ b/include/clang/Sema/Lookup.h @@ -733,7 +733,8 @@ public: Decls.erase(cast(D->getCanonicalDecl())); } - class iterator { + class iterator + : public std::iterator { typedef llvm::DenseMap::iterator inner_iterator; inner_iterator iter; @@ -745,7 +746,7 @@ public: iterator &operator++() { ++iter; return *this; } iterator operator++(int) { return iterator(iter++); } - NamedDecl *operator*() const { return iter->second; } + value_type operator*() const { return iter->second; } bool operator==(const iterator &other) const { return iter == other.iter; } bool operator!=(const iterator &other) const { return iter != other.iter; }