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
This commit is contained in:
jeffro256 2025-01-14 15:06:34 -06:00
parent 2d978eaaff
commit 43178fddc5
No known key found for this signature in database
GPG Key ID: 6F79797A6E392442

View File

@ -42,13 +42,14 @@ TEST(carrot_transcript_fixed, sizeof_sum)
EXPECT_EQ(12, (sp::detail::sizeof_sum<uint64_t, uint32_t>()));
}
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<DS1>((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<DS2>((uint32_t)32, (uint64_t)64);
EXPECT_EQ(1 + 13 + 4 + 8, transcript2.size());