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

This commit is contained in:
Harry Denholm 2025-10-17 15:01:49 +01:00
parent 656d14db8b
commit 1b2549ec70

View File

@ -429,7 +429,7 @@ template <typename Char> 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,