llvm.org GIT mirror llvm / dca600b
Allow operator-> to work from a FixedStreamArrayIterator. This is similar to my recent fix for VarStreamArrayIterator, but the cause (and thus the fix) is subtley different. The FixedStreamArrayIterator iterates over a const Array, so the iterator's value type must be const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302257 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian McCarthy 3 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
341341 template
342342 class FixedStreamArrayIterator
343343 : public iterator_facade_base,
344 std::random_access_iterator_tag, T> {
344 std::random_access_iterator_tag, const T> {
345345
346346 public:
347347 FixedStreamArrayIterator(const FixedStreamArray &Array, uint32_t Index)
355355 }
356356
357357 const T &operator*() const { return Array[Index]; }
358 const T &operator*() { return Array[Index]; }
358359
359360 bool operator==(const FixedStreamArrayIterator &R) const {
360361 assert(Array == R.Array);