From f09c6a10e000ddc386a39bfd96734ba2d5a135e2 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 4 Nov 2013 10:29:56 +0000 Subject: [PATCH] Make ADLResult::iterator a proper iterator. PR17796. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193986 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Sema/Lookup.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.40.0