[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 06:27:57 PDT 2024
================
@@ -482,39 +482,26 @@ TEST(ZipIteratorTest, ZipEqualConstCorrectness) {
EXPECT_THAT(first, ElementsAre(0, 0, 0));
EXPECT_THAT(second, ElementsAre(true, true, true));
- std::vector<bool> nemesis = {true, false, true};
- const std::vector<bool> c_nemesis = nemesis;
-
- for (auto &&[a, b, c, d] : zip_equal(first, c_first, nemesis, c_nemesis)) {
+ for (auto &&[a, b] : zip_equal(first, c_first)) {
a = 2;
- c = true;
static_assert(!IsConstRef<decltype(a)>);
static_assert(IsConstRef<decltype(b)>);
- static_assert(!IsBoolConstRef<decltype(c)>);
- static_assert(IsBoolConstRef<decltype(d)>);
----------------
kuhar wrote:
Why is this removed?
https://github.com/llvm/llvm-project/pull/112441
More information about the llvm-commits
mailing list