[llvm] [ADT] Make Zippy more iterator-like for lifetime safety (PR #112441)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 11:38:41 PDT 2024


kuhar wrote:

> I had some vague sense of that too, but didn't find (admittedly didn't look terribly hard) details on this - do you happen to have pointers to the specifics here?

IANALL but I found these:
* https://en.cppreference.com/w/cpp/iterator/forward_iterator#:~:text=Unlike%20the%20LegacyForwardIterator%20requirements%2C%20the%20forward_iterator%20concept%20does%20not%20require%20dereference%20to%20return%20a%20reference.
* https://stackoverflow.com/a/51094221
* https://en.cppreference.com/w/cpp/named_req/Iterator and https://en.cppreference.com/w/cpp/iterator/iter_t (note that there's no arrow operator check or anything that attempts to take the address of a dereferenced iterator)

https://github.com/llvm/llvm-project/pull/112441


More information about the llvm-commits mailing list