From c0ddbacfd3a461429de59f94f626ea54b46709d1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 22 Oct 2025 13:06:14 -0700 Subject: [PATCH 01/11] Bump version --- include/fmt/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index b9fe4e8f..77f63cd2 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -21,7 +21,7 @@ #endif // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 120000 +#define FMT_VERSION 120001 // Detect compiler versions. #if defined(__clang__) && !defined(__ibmxl__) From 7241bbb149efb4dff41e12ae84fe5375b5ad5b37 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 22 Oct 2025 13:11:04 -0700 Subject: [PATCH 02/11] Update changelog --- ChangeLog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index b91b6f62..5f5736b8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +# 12.0.1 - TBD + +- Worked around an ABI incompatibility in `std::locale_ref` between clang and + gcc (https://github.com/fmtlib/fmt/issues/4573). + # 12.0.0 - 2025-09-17 - Optimized the default floating point formatting From b95fd6132be3bdc647272a7aa523886f156b7b5f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 07:17:41 -0700 Subject: [PATCH 03/11] Avoid an ABI break for clang --- include/fmt/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 77f63cd2..2227545d 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -923,7 +923,7 @@ class locale_ref { public: constexpr locale_ref() : locale_(nullptr) {} - template + template locale_ref(const Locale& loc) : locale_(&loc) { // Check if std::isalpha is found via ADL to reduce the chance of misuse. isalpha('x', loc); From 70ed0ab82abf25cf1250d0ead47b936200b8e78f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 07:51:29 -0700 Subject: [PATCH 04/11] Update changelog --- ChangeLog.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5f5736b8..84be0472 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,8 +1,66 @@ -# 12.0.1 - TBD +# 12.1.0 - TBD + +- Optimized `buffer::append`, resulting in up to ~16% improvement on spdlog + benchmarks (https://github.com/fmtlib/fmt/pull/4541). Thanks @fyrsta7. - Worked around an ABI incompatibility in `std::locale_ref` between clang and gcc (https://github.com/fmtlib/fmt/issues/4573). +- Made `std::variant` and `std::expected` formatters work with `format_as` + (https://github.com/fmtlib/fmt/issues/4574, + https://github.com/fmtlib/fmt/pull/4575). Thanks @phprus. + +- Made `fmt::join` work with C++ modules + (https://github.com/fmtlib/fmt/issues/4379, + https://github.com/fmtlib/fmt/pull/4577). Thanks @Arghnews. + +- Exported `fmt::is_compiled_string` and `operator""_cf` from the module + (https://github.com/fmtlib/fmt/pull/4544). Thanks @CrackedMatter. + +- Fixed a compatibility issue with C++ modules in clang + (https://github.com/fmtlib/fmt/pull/4548). Thanks @tsarn. + +- Added support for cv-qualified types to the `std::optional` formatter + (https://github.com/fmtlib/fmt/issues/4561, + https://github.com/fmtlib/fmt/pull/4562). Thanks @OleksandrKvl. + +- Added demangling support (used in exception and `std::type_info` formatters) + for libc++ and clang-cl + (https://github.com/fmtlib/fmt/pull/4560, + https://github.com/fmtlib/fmt/issues/4568, + https://github.com/fmtlib/fmt/pull/4571). + Thanks @FatihBAKIR and @rohitsutreja. + +- Switched to global `malloc`/`free` to enable allocator customization + (https://github.com/fmtlib/fmt/issues/4569, + https://github.com/fmtlib/fmt/pull/4570). Thanks @rohitsutreja. + +- Made the `FMT_USE_CONSTEVAL` macro configurable by users + (https://github.com/fmtlib/fmt/pull/4546). Thanks @SnapperTT. + +- Fixed a dynamic linking issue with clang-cl + (https://github.com/fmtlib/fmt/issues/4576, + https://github.com/fmtlib/fmt/pull/4584). Thanks @FatihBAKIR. + +- Made more internal color APIs `constexpr` + (https://github.com/fmtlib/fmt/pull/4581). Thanks @ishani. + +- Fixed compatibility with clang as a host compiler for NVCC + (https://github.com/fmtlib/fmt/pull/4564). Thanks @valgur. + +- Fixed various warnings and lint issues + (https://github.com/fmtlib/fmt/issues/4565, + https://github.com/fmtlib/fmt/pull/4572, + https://github.com/fmtlib/fmt/pull/4557). + Thanks @LiangHuDream and @teruyamato0731. + +- Improved documentation + (https://github.com/fmtlib/fmt/pull/4551, + https://github.com/fmtlib/fmt/issues/4566, + https://github.com/fmtlib/fmt/pull/4567, + https://github.com/fmtlib/fmt/pull/4578,). + Thanks @teruyamato0731, @petersteneteg and @zimmerman-dev. + # 12.0.0 - 2025-09-17 - Optimized the default floating point formatting From 7adc922ebb0c5b589b8e643492f4a4c397dbe235 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 08:02:24 -0700 Subject: [PATCH 05/11] Update changelog --- ChangeLog.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 84be0472..3087f9ad 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -26,7 +26,8 @@ - Added demangling support (used in exception and `std::type_info` formatters) for libc++ and clang-cl - (https://github.com/fmtlib/fmt/pull/4560, + (https://github.com/fmtlib/fmt/issues/4542, + https://github.com/fmtlib/fmt/pull/4560, https://github.com/fmtlib/fmt/issues/4568, https://github.com/fmtlib/fmt/pull/4571). Thanks @FatihBAKIR and @rohitsutreja. @@ -38,6 +39,12 @@ - Made the `FMT_USE_CONSTEVAL` macro configurable by users (https://github.com/fmtlib/fmt/pull/4546). Thanks @SnapperTT. +- Fixed compilation with locale disabled in the header-only mode + (https://github.com/fmtlib/fmt/issues/4550). + +- Fixed compilation with clang 21 and `-std=c++20` + (https://github.com/fmtlib/fmt/issues/4552). + - Fixed a dynamic linking issue with clang-cl (https://github.com/fmtlib/fmt/issues/4576, https://github.com/fmtlib/fmt/pull/4584). Thanks @FatihBAKIR. @@ -55,7 +62,8 @@ Thanks @LiangHuDream and @teruyamato0731. - Improved documentation - (https://github.com/fmtlib/fmt/pull/4551, + (https://github.com/fmtlib/fmt/issues/4549, + https://github.com/fmtlib/fmt/pull/4551, https://github.com/fmtlib/fmt/issues/4566, https://github.com/fmtlib/fmt/pull/4567, https://github.com/fmtlib/fmt/pull/4578,). From 728dfeab5bfe5ddb500ee37d33d8608c456b7c4d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 08:06:23 -0700 Subject: [PATCH 06/11] Fix apidoc comment --- include/fmt/os.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/fmt/os.h b/include/fmt/os.h index 9455d9d3..94d730de 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -136,10 +136,9 @@ FMT_API std::system_error vwindows_error(int error_code, string_view fmt, * **Example**: * * // This throws a system_error with the description - * // cannot open file 'madeup': The system cannot find the file - * specified. - * // or similar (system message may vary). - * const char *filename = "madeup"; + * // cannot open file 'foo': The system cannot find the file specified. + * // or similar (system message may vary) if the file doesn't exist. + * const char *filename = "foo"; * LPOFSTRUCT of = LPOFSTRUCT(); * HFILE file = OpenFile(filename, &of, OF_READ); * if (file == HFILE_ERROR) { From ff357e9e4ac7f10c725566b71910b06a5408083d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 08:10:57 -0700 Subject: [PATCH 07/11] Remove extra whitespace --- include/fmt/std.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/std.h b/include/fmt/std.h index bfa13fa0..184c6d26 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -514,7 +514,7 @@ template <> struct formatter { public: FMT_CONSTEXPR void set_debug_format(bool set = true) { debug_ = set; } - + FMT_CONSTEXPR auto parse(parse_context<>& ctx) -> const char* { auto it = ctx.begin(), end = ctx.end(); if (it == end) return it; From 913507044b55d7cc4203eb6285c483c61561aca6 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Sat, 25 Oct 2025 16:28:24 +0100 Subject: [PATCH 08/11] Fix leaky `diagnostic ignored` pragma (#4588) Ignoring the `-Wconversion` diagnostic in `make_format_args` was leaking out of the header, resulting in that warning being ignored in downstream code that includes `fmt/base.h`. Instead, we should `push`/`pop` the diagnostics to ensure this is cleaned up. --- include/fmt/base.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/fmt/base.h b/include/fmt/base.h index 2227545d..2e443ca0 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -236,6 +236,7 @@ FMT_PRAGMA_GCC(optimize("Og")) # define FMT_GCC_OPTIMIZED #endif FMT_PRAGMA_CLANG(diagnostic push) +FMT_PRAGMA_GCC(diagnostic push) #ifdef FMT_ALWAYS_INLINE // Use the provided definition. @@ -2997,6 +2998,7 @@ FMT_INLINE void println(format_string fmt, T&&... args) { return fmt::println(stdout, fmt, static_cast(args)...); } +FMT_PRAGMA_GCC(diagnostic pop) FMT_PRAGMA_CLANG(diagnostic pop) FMT_PRAGMA_GCC(pop_options) FMT_END_EXPORT From 681c9e689be8fb00f7aadac511244be60e995165 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 08:30:01 -0700 Subject: [PATCH 09/11] Update changelog --- ChangeLog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 3087f9ad..847a9bb9 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -49,6 +49,9 @@ (https://github.com/fmtlib/fmt/issues/4576, https://github.com/fmtlib/fmt/pull/4584). Thanks @FatihBAKIR. +- Fixed a warning suppression leakage on gcc + (https://github.com/fmtlib/fmt/pull/4588). Thanks @ZedThree. + - Made more internal color APIs `constexpr` (https://github.com/fmtlib/fmt/pull/4581). Thanks @ishani. From 5987082c4760b01325494c9a68e5f19b303113f4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 08:30:18 -0700 Subject: [PATCH 10/11] Bump version --- include/fmt/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 2e443ca0..0d578677 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -21,7 +21,7 @@ #endif // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 120001 +#define FMT_VERSION 120100 // Detect compiler versions. #if defined(__clang__) && !defined(__ibmxl__) From f781d2b9321934f881de1ddb5be1db69fae1632e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 25 Oct 2025 09:10:24 -0700 Subject: [PATCH 11/11] Update ChangeLog.md --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 847a9bb9..fe0828f7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -39,7 +39,7 @@ - Made the `FMT_USE_CONSTEVAL` macro configurable by users (https://github.com/fmtlib/fmt/pull/4546). Thanks @SnapperTT. -- Fixed compilation with locale disabled in the header-only mode +- Fixed compilation with locales disabled in the header-only mode (https://github.com/fmtlib/fmt/issues/4550). - Fixed compilation with clang 21 and `-std=c++20`