Fix compilation error with gcc-7.2.0

Without the added line, the gcc-7.2.0 compiler will give the following error:
```
/opt/compiler-explorer/libs/fmt/trunk/include/fmt/format.h:1240:8: error: uninitialized variable 'buffer' in 'constexpr' function
   Char buffer[digits10<UInt>() + 1];
        ^~~~~~
```
See https://godbolt.org/z/fh7TMs9qs
This commit is contained in:
Greg Sjaardema 2022-08-29 13:47:17 -06:00 committed by Victor Zverovich
parent 33b4c33c5b
commit 40e414d823

View File

@ -1238,7 +1238,7 @@ template <typename Char, typename UInt, typename Iterator,
FMT_CONSTEXPR inline auto format_decimal(Iterator out, UInt value, int size)
-> format_decimal_result<Iterator> {
// Buffer is large enough to hold all digits (digits10 + 1).
Char buffer[digits10<UInt>() + 1];
Char buffer[digits10<UInt>() + 1] = {};
auto end = format_decimal(buffer, value, size).end;
return {out, detail::copy_str_noinline<Char>(buffer, end, out)};
}