From 378a5ab3c1fbb16873596de5215db5aa55bd5b09 Mon Sep 17 00:00:00 2001 From: Harry Denholm Date: Fri, 17 Oct 2025 15:10:56 +0000 Subject: [PATCH] value-initialise the buffer array member of detail::ansi_color_escape so that it can be used in a constexpr context in MSVC; compiler rejects as non-constant due to 'uninitialized symbol' otherwise (#4581) Co-authored-by: Harry Denholm --- include/fmt/color.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/color.h b/include/fmt/color.h index b69c1488..2cbc53ca 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -429,7 +429,7 @@ template struct ansi_color_escape { private: static constexpr size_t num_emphases = 8; - Char buffer[7u + 4u * num_emphases]; + Char buffer[7u + 4u * num_emphases] = {}; size_t size = 0; static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out,