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
ItTy getCurrent() { return this->I; }
- FuncReturnTy operator*() { return F(*this->I); }
+ FuncReturnTy operator*() const { return F(*this->I); }
private:
FuncTy F;
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: