From 43178fddc51b65d18f342465c918a46e194d3546 Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Tue, 14 Jan 2025 15:06:34 -0600 Subject: [PATCH] fix GCC 8.3 compile bug for some reason, moving the `constexpr` string literals outside the function body fixes issue on GCC 8.3, the default compiler of Debian 10 --- tests/unit_tests/carrot_transcript_fixed.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests/carrot_transcript_fixed.cpp b/tests/unit_tests/carrot_transcript_fixed.cpp index a12cebb13..97b4ea99e 100644 --- a/tests/unit_tests/carrot_transcript_fixed.cpp +++ b/tests/unit_tests/carrot_transcript_fixed.cpp @@ -42,13 +42,14 @@ TEST(carrot_transcript_fixed, sizeof_sum) EXPECT_EQ(12, (sp::detail::sizeof_sum())); } +static constexpr const unsigned char DS1[] = "perspicacious"; +static constexpr const unsigned char DS2[] = "recrudescence"; + TEST(carrot_transcript_fixed, ts_size) { - static constexpr const unsigned char DS1[14] = "perspicacious"; const auto transcript1 = sp::make_fixed_transcript((uint32_t)32); EXPECT_EQ(1 + 13 + 4, transcript1.size()); - static constexpr const unsigned char DS2[14] = "recrudescence"; const auto transcript2 = sp::make_fixed_transcript((uint32_t)32, (uint64_t)64); EXPECT_EQ(1 + 13 + 4 + 8, transcript2.size());