|
| 1 | +# 11.1.0 - 2024-12-25 |
| 2 | + |
| 3 | +- Improved C++20 module support |
| 4 | + (https://github.com/fmtlib/fmt/issues/4081, |
| 5 | + https://github.com/fmtlib/fmt/pull/4083, |
| 6 | + https://github.com/fmtlib/fmt/pull/4084, |
| 7 | + https://github.com/fmtlib/fmt/pull/4152, |
| 8 | + https://github.com/fmtlib/fmt/issues/4153, |
| 9 | + https://github.com/fmtlib/fmt/pull/4169, |
| 10 | + https://github.com/fmtlib/fmt/issues/4190, |
| 11 | + https://github.com/fmtlib/fmt/issues/4234, |
| 12 | + https://github.com/fmtlib/fmt/pull/4239). |
| 13 | + Thanks @kamrann and @Arghnews. |
| 14 | + |
| 15 | +- Reduced debug (unoptimized) binary code size and the number of template |
| 16 | + instantiations when passing formatting arguments. For example, unoptimized |
| 17 | + binary code size for `fmt::print("{}", 42)` was reduced by ~40% on GCC and |
| 18 | + ~60% on clang (x86-64). |
| 19 | + |
| 20 | + GCC: |
| 21 | + - Before: 161 instructions of which 105 are in reusable functions |
| 22 | + ([godbolt](https://www.godbolt.org/z/s9bGoo4ze)). |
| 23 | + - After: 116 instructions of which 60 are in reusable functions |
| 24 | + ([godbolt](https://www.godbolt.org/z/r7GGGxMs6)). |
| 25 | + |
| 26 | + Clang: |
| 27 | + - Before: 310 instructions of which 251 are in reusable functions |
| 28 | + ([godbolt](https://www.godbolt.org/z/Ts88b7M9o)). |
| 29 | + - After: 194 instructions of which 135 are in reusable functions |
| 30 | + ([godbolt](https://www.godbolt.org/z/vcrjP8ceW)). |
| 31 | + |
| 32 | +- Added an experimental `fmt::writer` API that can be used for writing to |
| 33 | + different destinations such as files or strings |
| 34 | + (https://github.com/fmtlib/fmt/issues/2354). |
| 35 | + For example ([godbolt](https://www.godbolt.org/z/rWoKfbP7e)): |
| 36 | + |
| 37 | + ```c++ |
| 38 | + #include <fmt/os.h> |
| 39 | + |
| 40 | + void write_text(fmt::writer w) { |
| 41 | + w.print("The answer is {}.", 42); |
| 42 | + } |
| 43 | + |
| 44 | + int main() { |
| 45 | + // Write to FILE. |
| 46 | + write_text(stdout); |
| 47 | + |
| 48 | + // Write to fmt::ostream. |
| 49 | + auto f = fmt::output_file("myfile"); |
| 50 | + write_text(f); |
| 51 | + |
| 52 | + // Write to std::string. |
| 53 | + auto sb = fmt::string_buffer(); |
| 54 | + write_text(sb); |
| 55 | + std::string s = sb.str(); |
| 56 | + } |
| 57 | + ``` |
| 58 | +
|
| 59 | +- Added width and alignment support to the formatter of `std::error_code`. |
| 60 | +
|
| 61 | +- Made `std::expected<void, E>` formattable |
| 62 | + (https://github.com/fmtlib/fmt/issues/4145, |
| 63 | + https://github.com/fmtlib/fmt/pull/4148). |
| 64 | + For example ([godbolt](https://www.godbolt.org/z/hrj5c6G86)): |
| 65 | +
|
| 66 | + ```c++ |
| 67 | + fmt::print("{}", std::expected<void, int>()); |
| 68 | + ``` |
| 69 | + |
| 70 | + prints |
| 71 | + |
| 72 | + ``` |
| 73 | + expected() |
| 74 | + ``` |
| 75 | + |
| 76 | + Thanks @phprus. |
| 77 | + |
| 78 | +- Made `fmt::is_formattable<void>` SFINAE-friendly |
| 79 | + (https://github.com/fmtlib/fmt/issues/4147). |
| 80 | + |
| 81 | +- Added support for `_BitInt` formatting when using clang |
| 82 | + (https://github.com/fmtlib/fmt/issues/4007, |
| 83 | + https://github.com/fmtlib/fmt/pull/4072, |
| 84 | + https://github.com/fmtlib/fmt/issues/4140, |
| 85 | + https://github.com/fmtlib/fmt/issues/4173, |
| 86 | + https://github.com/fmtlib/fmt/pull/4176). |
| 87 | + For example ([godbolt](https://www.godbolt.org/z/KWjbWec5z)): |
| 88 | + |
| 89 | + ```c++ |
| 90 | + using int42 = _BitInt(42); |
| 91 | + fmt::print("{}", int42(100)); |
| 92 | + ``` |
| 93 | +
|
| 94 | + Thanks @Arghnews. |
| 95 | +
|
| 96 | +- Added the `n` specifier for tuples and pairs |
| 97 | + (https://github.com/fmtlib/fmt/pull/4107). Thanks @someonewithpc. |
| 98 | +
|
| 99 | +- Added support for tuple-like types to `fmt::join` |
| 100 | + (https://github.com/fmtlib/fmt/issues/4226, |
| 101 | + https://github.com/fmtlib/fmt/pull/4230). Thanks @phprus. |
| 102 | +
|
| 103 | +- Made more types formattable at compile time |
| 104 | + (https://github.com/fmtlib/fmt/pull/4127). Thanks @AnthonyVH. |
| 105 | +
|
| 106 | +- Implemented a more efficient compile-time `fmt::formatted_size` |
| 107 | + (https://github.com/fmtlib/fmt/issues/4102, |
| 108 | + https://github.com/fmtlib/fmt/pull/4103). Thanks @phprus. |
| 109 | +
|
| 110 | +- Fixed compile-time formatting of some string types |
| 111 | + (https://github.com/fmtlib/fmt/pull/4065). Thanks @torshepherd. |
| 112 | +
|
| 113 | +- Made compiled version of `fmt::format_to` work with |
| 114 | + `std::back_insert_iterator<std::vector<char>>` |
| 115 | + (https://github.com/fmtlib/fmt/issues/4206, |
| 116 | + https://github.com/fmtlib/fmt/pull/4211). Thanks @phprus. |
| 117 | +
|
| 118 | +- Added a formatter for `std::reference_wrapper` |
| 119 | + (https://github.com/fmtlib/fmt/pull/4163, |
| 120 | + https://github.com/fmtlib/fmt/pull/4164). Thanks @yfeldblum and @phprus. |
| 121 | +
|
| 122 | +- Added experimental padding support (glibc `strftime` extension) to `%m`, `%j` |
| 123 | + and `%Y` (https://github.com/fmtlib/fmt/pull/4161). Thanks @KKhanhH. |
| 124 | +
|
| 125 | +- Made microseconds formatted as `us` instead of `µs` if the Unicode support is |
| 126 | + disabled (https://github.com/fmtlib/fmt/issues/4088). |
| 127 | +
|
| 128 | +- Fixed an unreleased regression in transcoding of surrogate pairs |
| 129 | + (https://github.com/fmtlib/fmt/issues/4094, |
| 130 | + https://github.com/fmtlib/fmt/pull/4095). Thanks @phprus. |
| 131 | +
|
| 132 | +- Made `fmt::appender` satisfy `std::output_iterator` concept |
| 133 | + (https://github.com/fmtlib/fmt/issues/4092, |
| 134 | + https://github.com/fmtlib/fmt/pull/4093). Thanks @phprus. |
| 135 | +
|
| 136 | +- Made `std::iterator_traits<fmt::appender>` standard-conforming |
| 137 | + (https://github.com/fmtlib/fmt/pull/4185). Thanks @CaseyCarter. |
| 138 | +
|
| 139 | +- Made it easier to reuse `fmt::formatter<std::string_view>` for types with |
| 140 | + an implicit conversion to `std::string_view` |
| 141 | + (https://github.com/fmtlib/fmt/issues/4036, |
| 142 | + https://github.com/fmtlib/fmt/pull/4055). Thanks @Arghnews. |
| 143 | +
|
| 144 | +- Made it possible to disable `<filesystem>` use via `FMT_CPP_LIB_FILESYSTEM` |
| 145 | + for compatibility with some video game console SDKs, e.g. Nintendo Switch SDK |
| 146 | + (https://github.com/fmtlib/fmt/issues/4257, |
| 147 | + https://github.com/fmtlib/fmt/pull/4258, |
| 148 | + https://github.com/fmtlib/fmt/pull/4259). Thanks @W4RH4WK and @phprus. |
| 149 | +
|
| 150 | +- Fixed compatibility with platforms that use 80-bit `long double` |
| 151 | + (https://github.com/fmtlib/fmt/issues/4245, |
| 152 | + https://github.com/fmtlib/fmt/pull/4246). Thanks @jsirpoma. |
| 153 | +
|
| 154 | +- Added support for UTF-32 code units greater than `0xFFFF` in fill |
| 155 | + (https://github.com/fmtlib/fmt/issues/4201). |
| 156 | +
|
| 157 | +- Fixed handling of legacy encodings on Windows with GCC |
| 158 | + (https://github.com/fmtlib/fmt/issues/4162). |
| 159 | +
|
| 160 | +- Made `fmt::to_string` take `fmt::basic_memory_buffer` by const reference |
| 161 | + (https://github.com/fmtlib/fmt/issues/4261, |
| 162 | + https://github.com/fmtlib/fmt/pull/4262). Thanks @sascha-devel. |
| 163 | +
|
| 164 | +- Added `fmt::dynamic_format_arg_store::size` |
| 165 | + (https://github.com/fmtlib/fmt/pull/4270). Thanks @hannes-harnisch. |
| 166 | +
|
| 167 | +- Removed the ability to control locale usage via an undocumented |
| 168 | + `FMT_STATIC_THOUSANDS_SEPARATOR` in favor of `FMT_USE_LOCALE`. |
| 169 | +
|
| 170 | +- Renamed `FMT_EXCEPTIONS` to `FMT_USE_EXCEPTIONS` for consistency with other |
| 171 | + similar macros. |
| 172 | +
|
| 173 | +- Improved include directory ordering to reduce the chance of including |
| 174 | + incorrect headers when using multiple versions of {fmt} |
| 175 | + (https://github.com/fmtlib/fmt/pull/4116). Thanks @cdzhan. |
| 176 | +
|
| 177 | +- Made it possible to compile a subset of {fmt} without the C++ runtime. |
| 178 | +
|
| 179 | +- Improved documentation and README |
| 180 | + (https://github.com/fmtlib/fmt/pull/4066, |
| 181 | + https://github.com/fmtlib/fmt/issues/4117, |
| 182 | + https://github.com/fmtlib/fmt/issues/4203, |
| 183 | + https://github.com/fmtlib/fmt/pull/4235). Thanks @zyctree and @nikola-sh. |
| 184 | +
|
| 185 | +- Improved the documentation generator (https://github.com/fmtlib/fmt/pull/4110, |
| 186 | + https://github.com/fmtlib/fmt/pull/4115). Thanks @rturrado. |
| 187 | +
|
| 188 | +- Improved CI (https://github.com/fmtlib/fmt/pull/4155, |
| 189 | + https://github.com/fmtlib/fmt/pull/4151). Thanks @phprus. |
| 190 | +
|
| 191 | +- Fixed various warnings and compilation issues |
| 192 | + (https://github.com/fmtlib/fmt/issues/2708, |
| 193 | + https://github.com/fmtlib/fmt/issues/4091, |
| 194 | + https://github.com/fmtlib/fmt/issues/4109, |
| 195 | + https://github.com/fmtlib/fmt/issues/4113, |
| 196 | + https://github.com/fmtlib/fmt/issues/4125, |
| 197 | + https://github.com/fmtlib/fmt/issues/4129, |
| 198 | + https://github.com/fmtlib/fmt/pull/4130, |
| 199 | + https://github.com/fmtlib/fmt/pull/4131, |
| 200 | + https://github.com/fmtlib/fmt/pull/4132, |
| 201 | + https://github.com/fmtlib/fmt/issues/4133, |
| 202 | + https://github.com/fmtlib/fmt/issues/4144, |
| 203 | + https://github.com/fmtlib/fmt/issues/4150, |
| 204 | + https://github.com/fmtlib/fmt/issues/4158, |
| 205 | + https://github.com/fmtlib/fmt/pull/4159, |
| 206 | + https://github.com/fmtlib/fmt/issues/4160, |
| 207 | + https://github.com/fmtlib/fmt/pull/4170, |
| 208 | + https://github.com/fmtlib/fmt/issues/4177, |
| 209 | + https://github.com/fmtlib/fmt/pull/4187, |
| 210 | + https://github.com/fmtlib/fmt/pull/4188, |
| 211 | + https://github.com/fmtlib/fmt/pull/4194, |
| 212 | + https://github.com/fmtlib/fmt/pull/4200, |
| 213 | + https://github.com/fmtlib/fmt/issues/4205, |
| 214 | + https://github.com/fmtlib/fmt/issues/4207, |
| 215 | + https://github.com/fmtlib/fmt/pull/4208, |
| 216 | + https://github.com/fmtlib/fmt/pull/4210, |
| 217 | + https://github.com/fmtlib/fmt/issues/4220, |
| 218 | + https://github.com/fmtlib/fmt/issues/4231, |
| 219 | + https://github.com/fmtlib/fmt/issues/4232, |
| 220 | + https://github.com/fmtlib/fmt/pull/4233, |
| 221 | + https://github.com/fmtlib/fmt/pull/4236, |
| 222 | + https://github.com/fmtlib/fmt/pull/4267, |
| 223 | + https://github.com/fmtlib/fmt/pull/4271). |
| 224 | + Thanks @torsten48, @Arghnews, @tinfoilboy, @aminya, @Ottani, @zeroomega, |
| 225 | + @c4v4, @kongy, @vinayyadav3016, @sergio-nsk, @phprus and @YexuanXiao. |
| 226 | +
|
1 | 227 | # 11.0.2 - 2024-07-20
|
2 | 228 |
|
3 | 229 | - Fixed compatibility with non-POSIX systems
|
|
268 | 494 | - Fixed handling of negative ids in `fmt::basic_format_args::get`
|
269 | 495 | (https://github.com/fmtlib/fmt/pull/3945). Thanks @marlenecota.
|
270 | 496 |
|
| 497 | +- Fixed handling of a buffer boundary on flush |
| 498 | + (https://github.com/fmtlib/fmt/issues/4229). |
| 499 | +
|
271 | 500 | - Improved named argument validation
|
272 | 501 | (https://github.com/fmtlib/fmt/issues/3817).
|
273 | 502 |
|
|
0 commit comments