From 45f016d96fe4bdc4c56d521509b88991f667c619 Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Wed, 5 Feb 2020 14:41:41 -0800 Subject: [PATCH] add back capture variable for comparison in span_test --- tests/span_tests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 } }