From d048e4db62a620eba5309645ab8582b2f4f859f8 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 23 Mar 2023 14:29:38 -0700 Subject: [PATCH] Mirror MSVC-PR-460102. --- tests/std/include/test_header_units_and_modules.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/std/include/test_header_units_and_modules.hpp b/tests/std/include/test_header_units_and_modules.hpp index 9b73391c185..20409d99ca4 100644 --- a/tests/std/include/test_header_units_and_modules.hpp +++ b/tests/std/include/test_header_units_and_modules.hpp @@ -331,7 +331,7 @@ void test_istream() { void test_iterator() { using namespace std; puts("Testing ."); - constexpr int arr[]{10, 20, 30, 40, 50}; + static constexpr int arr[]{10, 20, 30, 40, 50}; constexpr reverse_iterator ri{end(arr)}; assert(*ri == 50); assert(*next(ri) == 40); @@ -675,7 +675,7 @@ void test_source_location() { void test_span() { using namespace std; puts("Testing ."); - constexpr int arr[]{11, 22, 33, 44, 55}; + static constexpr int arr[]{11, 22, 33, 44, 55}; constexpr span whole{arr}; constexpr span mid = whole.subspan<1, 3>(); assert(mid[0] == 22 && mid[1] == 33 && mid[2] == 44);