Support: Make VarStreamArrayIterator iterate over const values
VarStreamArrayIterator returns a reference to a just-computed internal value. Change it to iterate over `const ValueType` to avoid allowing clients to mutate the internal state, and to drop the non-`const`-qualified operator*(). The removed operator*() was from 175d70ee to get iterator_facade_base::operator->() working, and this fixes the root cause instead: setting `T` to `const ValueType` causes iterator_facade_base to infer `PointerT` as `const ValueType*`. Ironically, this is the last blocker for removing the const-incorrect overload of `iterator_facade_base::operator->()`, whose presence triggered adding the workaround in the first place :). Differential Revision: https://reviews.llvm.org/D113797
parent
3129b333
Please register or sign in to comment