mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-24 11:20:11 +01:00
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 <ishani@users.noreply.github.com>
This commit is contained in:
@@ -429,7 +429,7 @@ template <typename Char> struct ansi_color_escape {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr size_t num_emphases = 8;
|
static constexpr size_t num_emphases = 8;
|
||||||
Char buffer[7u + 4u * num_emphases];
|
Char buffer[7u + 4u * num_emphases] = {};
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
|
|
||||||
static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out,
|
static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out,
|
||||||
|
|||||||
Reference in New Issue
Block a user