From 1b2549ec70ca96e8253d286169d39edd47e3f448 Mon Sep 17 00:00:00 2001 From: Harry Denholm Date: Fri, 17 Oct 2025 15:01:49 +0100 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 --- 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,