From 6eab19d3c145911cd34f00644e041512cda6e717 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Tue, 17 Mar 2020 15:13:26 -0700 Subject: [PATCH] moving decl so we dont get the stl_nullptr is not used warning --- tests/span_compatibility_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/span_compatibility_tests.cpp b/tests/span_compatibility_tests.cpp index d8226ec..4be3c4d 100644 --- a/tests/span_compatibility_tests.cpp +++ b/tests/span_compatibility_tests.cpp @@ -46,12 +46,12 @@ TEST(span_compatibility_tests, assertion_tests) { int arr[3]{10, 20, 30}; std::array stl{{100, 200, 300}}; - std::array stl_nullptr{{nullptr, nullptr, nullptr}}; #if __cplusplus >= 201703l // This std::is_convertible_v fails for C++14 // so these conversions aren't valid in C++14 { + std::array stl_nullptr{{nullptr, nullptr, nullptr}}; gsl::span sp_const_nullptr_1{stl_nullptr}; EXPECT_TRUE(sp_const_nullptr_1.data() == stl_nullptr.data()); EXPECT_TRUE(sp_const_nullptr_1.size() == 3);