forked from OSchip/llvm-project
[STLExtras] Make const the * operator for mapped_iterator.
Summary: The current non-const * operator shadows the const operator in iterator_adaptor_base. Reviewers: mehdi_amini, rriddle!, dblaikie, timshen Subscribers: dexonsmith, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78073
This commit is contained in:
parent
3c87fba27f
commit
d5fcb7966e
|
@ -214,7 +214,7 @@ public:
|
|||
|
||||
ItTy getCurrent() { return this->I; }
|
||||
|
||||
FuncReturnTy operator*() { return F(*this->I); }
|
||||
FuncReturnTy operator*() const { return F(*this->I); }
|
||||
|
||||
private:
|
||||
FuncTy F;
|
||||
|
|
|
@ -228,7 +228,7 @@ private:
|
|||
explicit attr_value_iterator(ArrayAttr::iterator it)
|
||||
: llvm::mapped_iterator<ArrayAttr::iterator, AttrTy (*)(Attribute)>(
|
||||
it, [](Attribute attr) { return attr.cast<AttrTy>(); }) {}
|
||||
AttrTy operator*() { return (*this->I).template cast<AttrTy>(); }
|
||||
AttrTy operator*() const { return (*this->I).template cast<AttrTy>(); }
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue