[PATCH] D144503: [ADT] Allow `llvm::enumerate` to enumerate over multiple ranges
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 12:22:54 PST 2023
dblaikie added a comment.
I think it's the InputIterator (ForwardIterators must be InputIterators) requirement is the one that makes value returns not possible in practice because they're required to support `i->m` as being equivalent to (*i).m`, which isn't possible, as far as I recall/understand without backing storage to return a pointer to?
Oh, and ForwardIterator also says (on cppreference):
Let T be the value type of It. The type std::iterator_traits<It>::reference must be either
T& or T&& (since C++11) if It satisfies LegacyOutputIterator (It is mutable), or
const T& or const T&& (since C++11) otherwise (It is constant),
(where T is the type denoted by std::iterator_traits<It>::value_type)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144503/new/
https://reviews.llvm.org/D144503
More information about the llvm-commits
mailing list