[PATCH] D63632: Update the llvm::enumerate utility class result_pair to use the 'iterator_traits<R>::reference' instead of 'ValueOfIter<R> &'.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 15:17:18 PDT 2019
dblaikie added a comment.
My understanding was/is that iterators can't return values instead of references (that such a thing doesn't meet the standard requirements for iterators) and that iterators basically have to have internal storage for things like this.
I think that requirement comes from the requirement that if "(*i).j" is valid" for some iterator 'i' then "i->j" must also be valid - and since op-> returns a pointer, then there must be storage.
So perhaps mapped_iterator should be fixed to be conforming?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63632/new/
https://reviews.llvm.org/D63632
More information about the llvm-commits
mailing list