diff --git a/ChangeLog.md b/ChangeLog.md index e96f9df8..f7deab4b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,204 @@ +# 12.2.0 - TBD + +- Added a C11 API with type-safe formatting via `_Generic`. The new `fmt-c` + library and `fmt/fmt-c.h` header allow C code to use {fmt}'s formatter + with compile-time type checking + (https://github.com/fmtlib/fmt/issues/4663, + https://github.com/fmtlib/fmt/pull/4671, + https://github.com/fmtlib/fmt/pull/4696, + https://github.com/fmtlib/fmt/issues/4693, + https://github.com/fmtlib/fmt/pull/4694, + https://github.com/fmtlib/fmt/pull/4712). + Thanks @Soumik15630m, @yrlf and @localspook. + +- Reduced binary size of debug builds (~200k to ~85k in the bloat test) and + improved compile speed when consteval is unavailable. + +- Added a separate `fmt::fmt-module` CMake target for C++20 modules and a + Linux CI workflow that exercises module-based builds + (https://github.com/fmtlib/fmt/issues/4684, + https://github.com/fmtlib/fmt/pull/4685, + https://github.com/fmtlib/fmt/issues/4707, + https://github.com/fmtlib/fmt/pull/4708, + https://github.com/fmtlib/fmt/pull/4702, + https://github.com/fmtlib/fmt/pull/4709). + Thanks @MathewBensonCode. + +- Enabled the full Dragonbox lookup cache by default for floating-point + formatting unless optimizing for binary size (`__OPTIMIZE_SIZE__`), + giving a ~10–25% speedup. Thanks Matthias Kretz for the suggestion. + +- Improved integer formatting throughput by ~3% + (https://github.com/fmtlib/fmt/pull/4630). Thanks @user202729. + +- Optimized formatting into back-insert iterators by using bulk container + append/insert methods (e.g. on `std::vector` and custom string + types) (https://github.com/fmtlib/fmt/pull/4679). Thanks @user202729. + +- Made path formatting lossless, preserving ill-formed UTF-16 + sequences when converting `std::filesystem::path` to a narrow string. + +- Added overloads of `fmt::println` that take a `fmt::text_style` + (https://github.com/fmtlib/fmt/pull/4782). Thanks @ahoarau. + +- Added support for formatting `std::unexpected` + (https://github.com/fmtlib/fmt/pull/4675). Thanks @17steen. + +- Added support for positional arguments as width and precision specifiers + in `fmt::printf` (https://github.com/fmtlib/fmt/pull/4643). + Thanks @KareemOtoum. + +- Made `FMT_STRING` a no-op when `FMT_USE_CONSTEVAL` is enabled, since the + consteval format-string constructor already provides compile-time + validation + (https://github.com/fmtlib/fmt/issues/4611, + https://github.com/fmtlib/fmt/pull/4612). Thanks @friedkeenan. + +- Promoted `fmt::detail::named_arg` to the public API as `fmt::named_arg` and + deprecated the detail alias + (https://github.com/fmtlib/fmt/issues/4683, + https://github.com/fmtlib/fmt/pull/4687). Thanks @TPPPP72. + +- Moved the `std::byte` formatter from `fmt/format.h` to `fmt/std.h`. + +- Provided a default definition for `fmt::is_contiguous` + (https://github.com/fmtlib/fmt/pull/4731, + https://github.com/fmtlib/fmt/pull/4770). Thanks @user202729 and @phprus. + +- Added the `FMT_USE_FLOCKFILE` macro to force `has_flockfile` to false + (https://github.com/fmtlib/fmt/issues/4646, + https://github.com/fmtlib/fmt/pull/4666). Thanks @MikeVastola. + +- Added `include_guard(GLOBAL)` so that {fmt} can be used in multiple + submodules of the same project + (https://github.com/fmtlib/fmt/pull/4672). Thanks @torsten48. + +- Added `constexpr` to argument `value` constructors and to + `static_format_result` members + (https://github.com/fmtlib/fmt/pull/4659, + https://github.com/fmtlib/fmt/pull/4591). + Thanks @elbeno and @17steen. + +- Deprecated the implicit conversion from `fmt::format_string` and + `fmt::basic_fstring` to `string_view` to align with `std::format_string`; + use `format_string::get()` instead. + +- Opted out `std::complex` from tuple formatting so that the dedicated + `std::complex` formatter is always used. + +- Removed the `fmt::say` function. + +- Deprecated the `std::initializer_list` overload of `fmt::join` and the array + overload of `fmt::vformat_to`. + +- Made the `` header equivalent to `` by + default. Code that relied on `` pulling in `` + must now either include `` directly or define + `FMT_DEPRECATED_HEAVY_CORE` to opt back in. + +- Improved `wchar_t` support: `fmt::join` now accepts `wchar_t` and other + non-`char` separators, and `fmt::format_to_n` now works with `fmt::runtime` + on `wchar_t` + (https://github.com/fmtlib/fmt/pull/4686, + https://github.com/fmtlib/fmt/issues/4714, + https://github.com/fmtlib/fmt/pull/4715). + Thanks @Yancey2023 and @sunmy2019. + +- Fixed formatting of `std::tm` with a null `tm_zone` + (https://github.com/fmtlib/fmt/pull/4790). Thanks @JiamiLin. + +- Fixed compile-time formatting in `fmt/ranges.h`, `fmt/style.h` and + `fmt/std.h` (https://github.com/fmtlib/fmt/pull/4759). Thanks @j4niwzis. + +- Fixed an ambiguity between `formatter>` in `fmt/std.h` + and `fmt/ranges.h` on C++26 (P3168R2) + (https://github.com/fmtlib/fmt/pull/4761). Thanks @phprus. + +- Fixed a GCC PCH breakage triggered by a scoped `#pragma GCC optimize`. + +- Fixed a TSAN false positive in the locale handling code + (https://github.com/fmtlib/fmt/issues/4755). + +- Fixed compile-time format string checks truncating string literals at + an embedded null byte + (https://github.com/fmtlib/fmt/pull/4732). Thanks @user202729. + +- Fixed an out-of-bounds read in `fmt::vprintf` with a trailing `%` + (https://github.com/fmtlib/fmt/issues/4741, + https://github.com/fmtlib/fmt/pull/4742). Thanks @rmarin. + +- Fixed the return type of the `f(un)lockfile` wrappers on Windows + (https://github.com/fmtlib/fmt/pull/4739). Thanks @MikeVastola. + +- Worked around a CUDA issue when handling UTF-32 literals + (https://github.com/fmtlib/fmt/pull/4719). Thanks @Cazadorro. + +- Fixed missing named-argument validation for compiled format strings + (https://github.com/fmtlib/fmt/pull/4638). Thanks @JaeheonShim. + +- Fixed `fmt::format_to_n` in `` failing to compile when + `` is not transitively included + (https://github.com/fmtlib/fmt/issues/4615). + +- Fixed handling of pointers in format string compilation with + `FMT_BUILTIN_TYPES=0`. + +- Stopped assuming nul termination of the format string in `fmt::printf`. + Thanks @ZUENS2020 for reporting. + +- Fixed a build error when locale support is disabled + (https://github.com/fmtlib/fmt/pull/4627). Thanks @marcel-behlau-elfin. + +- Fixed a fallback range formatter for types with a `container_type` member + (https://github.com/fmtlib/fmt/issues/4123, + https://github.com/fmtlib/fmt/pull/4660). Thanks @Soumik15630m. + +- Fixed C++20 concept detection + (https://github.com/fmtlib/fmt/pull/4653). Thanks @lagoho7. + +- Fixed a clang compilation failure + (https://github.com/fmtlib/fmt/pull/4718). Thanks @mccakit. + +- Fixed various MSVC warnings, including C4305 and conversion warnings on + x86 (https://github.com/fmtlib/fmt/pull/4668, + https://github.com/fmtlib/fmt/pull/4594). + Thanks @kanren3 and @JBerger. + +- Updated the Android Gradle Plugin to 9.x + (https://github.com/fmtlib/fmt/issues/4651, + https://github.com/fmtlib/fmt/pull/4658). Thanks @Soumik15630m. + +- Made various code, build and test improvements + (https://github.com/fmtlib/fmt/pull/4625, + https://github.com/fmtlib/fmt/pull/4639, + https://github.com/fmtlib/fmt/pull/4644, + https://github.com/fmtlib/fmt/pull/4656, + https://github.com/fmtlib/fmt/pull/4680, + https://github.com/fmtlib/fmt/pull/4681, + https://github.com/fmtlib/fmt/pull/4704, + https://github.com/fmtlib/fmt/pull/4710, + https://github.com/fmtlib/fmt/pull/4713, + https://github.com/fmtlib/fmt/pull/4729, + https://github.com/fmtlib/fmt/pull/4751, + https://github.com/fmtlib/fmt/pull/4758). + Thanks @ZephyrLykos, @togunchan, @kagancansit, @BerndPetrovitsch, + @Skylion007, @st0rmbtw and @localspook. + +- Improved documentation, including a rewrite of the format string syntax, + better handling of doxygen tags, documenting `output_file`, fixing CSS so + that whitespace is displayed properly, and various smaller fixes + (https://github.com/fmtlib/fmt/pull/4622, + https://github.com/fmtlib/fmt/pull/4626, + https://github.com/fmtlib/fmt/pull/4631, + https://github.com/fmtlib/fmt/pull/4667, + https://github.com/fmtlib/fmt/pull/4616, + https://github.com/fmtlib/fmt/pull/4748). + Thanks @heavywatal, @ZephyrLykos, @user202729, @ssszcmawo, @bigmoonbit + and @Powerbyte7. + +- Added building of release artifacts and SLSA provenance in CI, added a + CodeQL workflow, and added the security policy in `.github/SECURITY.md`. + # 12.1.0 - 2025-10-29 - Optimized `buffer::append`, resulting in up to ~16% improvement on spdlog