add back capture variable for comparison in span_test

This commit is contained in:
Jordan Maples [MSFT] 2020-02-05 14:41:41 -08:00
parent ff5f7973a2
commit 45f016d96f

View File

@ -1103,11 +1103,11 @@ TEST(span_test, from_array_constructor)
span<int> s = a;
span<int> s2 = b;
#if (__cplusplus > 201402L)
EXPECT_DEATH([[maybe_unused]] s.begin() == s2.begin(), deathstring);
EXPECT_DEATH([[maybe_unused]] s.begin() <= s2.begin(), deathstring);
EXPECT_DEATH([[maybe_unused]] bool _ = (s.begin() == s2.begin()), deathstring);
EXPECT_DEATH([[maybe_unused]] bool _ = (s.begin() <= s2.begin()), deathstring);
#else
EXPECT_DEATH(s.begin() == s2.begin(), deathstring);
EXPECT_DEATH(s.begin() <= s2.begin(), deathstring);
EXPECT_DEATH(bool _ = (s.begin() == s2.begin()), deathstring);
EXPECT_DEATH(bool _ = (s.begin() <= s2.begin()), deathstring);
#endif
}
}