[llvm] [ADT] Make concat able to handle ranges with iterators that return by value (such as zip) (PR #112783)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 17:13:19 PDT 2024
================
@@ -1065,27 +1075,30 @@ class concat_iterator
/// Returns null if the specified iterator is at the end. Otherwise,
/// dereferences the iterator and returns the address of the resulting
/// reference.
- template <size_t Index> ValueT *getHelper() const {
+ template <size_t Index> handle_type getHelper() const {
auto &Begin = std::get<Index>(Begins);
auto &End = std::get<Index>(Ends);
if (Begin == End)
- return nullptr;
+ return {};
----------------
kuhar wrote:
Do we need this check at all? Should this be turned into an assertion instead or pushed to the callees?
https://github.com/llvm/llvm-project/pull/112783
More information about the llvm-commits
mailing list