diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index c1dbbef..5d9c18b 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -1103,11 +1103,11 @@ TEST(span_test, from_array_constructor) span s = a; span 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 } }