|
17 | 17 |
|
18 | 18 | Thanks `@jk-jeon (Junekey Jeon) <https://github.com/jk-jeon>`_. |
19 | 19 |
|
| 20 | +* Replaced ``snprintf``-based hex float formatter with an internal |
| 21 | + implementation (`#3179 <https://github.com/fmtlib/fmt/pull/3179>`_, |
| 22 | + `#3203 <https://github.com/fmtlib/fmt/pull/3203>`_). |
| 23 | + Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_. |
| 24 | + |
20 | 25 | * Fixed alignment of floating-point numbers with localization |
21 | 26 | (`#3263 <https://github.com/fmtlib/fmt/issues/3263>`_, |
22 | 27 | `#3272 <https://github.com/fmtlib/fmt/pull/3272>`_). |
23 | 28 | Thanks `@ShawnZhong (Shawn Zhong) <https://github.com/ShawnZhong>`_. |
24 | 29 |
|
25 | 30 | * Improved C++20 module support |
26 | | - (`#3386 <https://github.com/fmtlib/fmt/pull/3386>`_, |
| 31 | + (`#3134 <https://github.com/fmtlib/fmt/pull/3134>`_, |
| 32 | + `#3254 <https://github.com/fmtlib/fmt/pull/3254>`_, |
| 33 | + `#3386 <https://github.com/fmtlib/fmt/pull/3386>`_, |
27 | 34 | `#3387 <https://github.com/fmtlib/fmt/pull/3387>`_, |
28 | 35 | `#3388 <https://github.com/fmtlib/fmt/pull/3388>`_, |
29 | 36 | `#3392 <https://github.com/fmtlib/fmt/pull/3392>`_, |
30 | 37 | `#3397 <https://github.com/fmtlib/fmt/pull/3397>`_, |
31 | 38 | `#3399 <https://github.com/fmtlib/fmt/pull/3399>`_, |
32 | 39 | `#3400 <https://github.com/fmtlib/fmt/pull/3400>`_). |
33 | | - Thanks `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_. |
| 40 | + Thanks `@laitingsheng (Tinson Lai) <https://github.com/laitingsheng>`_, |
| 41 | + `@Orvid (Orvid King) <https://github.com/Orvid>`_, |
| 42 | + `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_. |
34 | 43 | Switched to the `modules CMake library <https://github.com/vitaut/modules>`_ |
35 | 44 | which allows building {fmt} as a C++20 module with clang:: |
36 | 45 |
|
|
78 | 87 | (`#2207 <https://github.com/fmtlib/fmt/issues/2207>`_, |
79 | 88 | `#3117 <https://github.com/fmtlib/fmt/issues/3117>`_, |
80 | 89 | `#3115 <https://github.com/fmtlib/fmt/pull/3115>`_, |
| 90 | + `#3143 <https://github.com/fmtlib/fmt/pull/3143>`_, |
| 91 | + `#3144 <https://github.com/fmtlib/fmt/pull/3144>`_, |
81 | 92 | `#3349 <https://github.com/fmtlib/fmt/pull/3349>`_). |
82 | 93 | For example (`godbolt <https://godbolt.org/z/45738oGEo>`__): |
83 | 94 |
|
|
91 | 102 | } |
92 | 103 |
|
93 | 104 | Thanks `@patrickroocks (Patrick Roocks) <https://github.com/patrickroocks>`_ |
94 | | - and `@BRevzin (Barry Revzin) <https://github.com/BRevzin>`_. |
| 105 | + `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_, |
| 106 | + `@BRevzin (Barry Revzin) <https://github.com/BRevzin>`_. |
| 107 | + |
| 108 | +* Add precision support to ``%S`` |
| 109 | + (`#3148 <https://github.com/fmtlib/fmt/pull/3148>`_). |
| 110 | + Thanks `@SappyJoy (Stepan Ponomaryov) <https://github.com/SappyJoy>`_ |
95 | 111 |
|
96 | 112 | * Added support for ``std::utc_time`` |
97 | 113 | (`#3098 <https://github.com/fmtlib/fmt/issues/3098>`_, |
|
114 | 130 | `#3232 <https://github.com/fmtlib/fmt/pull/3232>`_). |
115 | 131 | Thanks `@ShawnZhong (Shawn Zhong) <https://github.com/ShawnZhong>`_. |
116 | 132 |
|
| 133 | +* Added a formatter for ``std::exception`` |
| 134 | + (`#2977 <https://github.com/fmtlib/fmt/issues/2977>`_, |
| 135 | + `#3012 <https://github.com/fmtlib/fmt/issues/3012>`_, |
| 136 | + `#3062 <https://github.com/fmtlib/fmt/pull/3062>`_, |
| 137 | + `#3076 <https://github.com/fmtlib/fmt/pull/3076>`_, |
| 138 | + `#3119 <https://github.com/fmtlib/fmt/pull/3119>`_). |
| 139 | + For example (`godbolt <https://godbolt.org/z/8xoWGs9e4>`__): |
| 140 | + |
| 141 | + .. code:: c++ |
| 142 | + |
| 143 | + #include <fmt/std.h> |
| 144 | + #include <vector> |
| 145 | + |
| 146 | + int main() { |
| 147 | + try { |
| 148 | + std::vector<bool>().at(0); |
| 149 | + } catch(const std::exception& e) { |
| 150 | + fmt::print("{}", e); |
| 151 | + } |
| 152 | + } |
| 153 | + |
| 154 | + prints:: |
| 155 | + |
| 156 | + vector<bool>::_M_range_check: __n (which is 0) >= this->size() (which is 0) |
| 157 | + |
| 158 | + on libstdc++. |
| 159 | + Thanks `@zach2good (Zach Toogood) <https://github.com/zach2good>`_ and |
| 160 | + `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_. |
| 161 | + |
| 162 | +* Moved ``std::error_code`` formatter from ``fmt/os.h`` to ``fmt/std.h``. |
| 163 | + (`#3125 <https://github.com/fmtlib/fmt/pull/3125>`_). |
| 164 | + Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_. |
| 165 | + |
117 | 166 | * Added formatters for standard container adapters: ``std::priority_queue``, |
118 | 167 | ``std::queue`` and ``std::stack`` |
119 | 168 | (`#3215 <https://github.com/fmtlib/fmt/issues/3215>`_, |
|
138 | 187 | (`#3347 <https://github.com/fmtlib/fmt/pull/3347>`_). |
139 | 188 | Thanks `@TheOmegaCarrot <https://github.com/TheOmegaCarrot>`_. |
140 | 189 |
|
141 | | -* Fixed formatting of noncopyable ranges |
142 | | - (`#3286 <https://github.com/fmtlib/fmt/issues/3286>`_, |
| 190 | +* Made ``fmt::ptr`` accept ``unique_ptr`` with a custom deleter |
| 191 | + (`#3177 <https://github.com/fmtlib/fmt/pull/3177>`_). |
| 192 | + Thanks `@hmbj (Hans-Martin B. Jensen) <https://github.com/hmbj>`_. |
| 193 | + |
| 194 | +* Fixed formatting of noncopyable ranges and nested ranges of chars |
| 195 | + (`#3158 <https://github.com/fmtlib/fmt/pull/3158>`_ |
| 196 | + `#3286 <https://github.com/fmtlib/fmt/issues/3286>`_, |
143 | 197 | `#3290 <https://github.com/fmtlib/fmt/pull/3290>`_). |
144 | 198 | Thanks `@BRevzin (Barry Revzin) <https://github.com/BRevzin>`_. |
145 | 199 |
|
|
187 | 241 | (`#3416 <https://github.com/fmtlib/fmt/pull/3416>`_). |
188 | 242 | Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_. |
189 | 243 |
|
| 244 | +* Added support for UTF-8 digit separators via an experimental locale facet |
| 245 | + (`#1861 <https://github.com/fmtlib/fmt/issues/1861>`_). |
| 246 | + For example (`godbolt <https://godbolt.org/z/f7bcznb3W>`__): |
| 247 | + |
| 248 | + .. code:: c++ |
| 249 | + |
| 250 | + auto loc = std::locale( |
| 251 | + std::locale(), new fmt::format_facet<std::locale>("’")); |
| 252 | + auto s = fmt::format(loc, "{:L}", 1000); |
| 253 | + |
| 254 | + where ``’`` is U+2019 used as a digit separator in the de_CH locale. |
| 255 | + |
| 256 | +* Added an overload of ``formatted_size`` that takes a locale |
| 257 | + (`#3084 <https://github.com/fmtlib/fmt/issues/3084>`_, |
| 258 | + `#3087 <https://github.com/fmtlib/fmt/pull/3087>`_). |
| 259 | + Thanks `@gerboengels <https://github.com/gerboengels>`_. |
| 260 | + |
190 | 261 | * Removed the deprecated ``FMT_DEPRECATED_OSTREAM``. |
191 | 262 |
|
192 | 263 | * Fixed a UB when using a null ``std::string_view`` with ``fmt::to_string`` |
|
195 | 266 | `#3244 <https://github.com/fmtlib/fmt/pull/3244>`_). |
196 | 267 | Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_. |
197 | 268 |
|
| 269 | +* Added ``starts_with`` to the fallback ``string_view`` implementation |
| 270 | + (`#3080 <https://github.com/fmtlib/fmt/pull/3080>`_). |
| 271 | + Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_. |
| 272 | + |
| 273 | +* Added ``fmt::basic_format_string::get()`` for compatibility with |
| 274 | + ``basic_format_string`` (`#3111 <https://github.com/fmtlib/fmt/pull/3111>`_). |
| 275 | + Thanks `@huangqinjin <https://github.com/huangqinjin>`_. |
| 276 | + |
198 | 277 | * Improved documentation |
199 | 278 | (`#3108 <https://github.com/fmtlib/fmt/issues/3108>`_, |
200 | 279 | `#3169 <https://github.com/fmtlib/fmt/issues/3169>`_, |
| 280 | + `#3243 <https://github.com/fmtlib/fmt/pull/3243>`_). |
201 | 281 | `#3404 <https://github.com/fmtlib/fmt/pull/3404>`_). |
202 | | - Thanks `@Vertexwahn <https://github.com/Vertexwahn>`_. |
| 282 | + Thanks `@Cleroth <https://github.com/Cleroth>`_ and |
| 283 | + `@Vertexwahn <https://github.com/Vertexwahn>`_. |
203 | 284 |
|
204 | 285 | * Improved build configuration and tests |
205 | | - (`#3189 <https://github.com/fmtlib/fmt/issues/3189>`_, |
| 286 | + (`#3118 <https://github.com/fmtlib/fmt/pull/3118>`_, |
| 287 | + `#3120 <https://github.com/fmtlib/fmt/pull/3120>`_, |
| 288 | + `#3188 <https://github.com/fmtlib/fmt/pull/3188>`_, |
| 289 | + `#3189 <https://github.com/fmtlib/fmt/issues/3189>`_, |
| 290 | + `#3198 <https://github.com/fmtlib/fmt/pull/3198>`_, |
| 291 | + `#3205 <https://github.com/fmtlib/fmt/pull/3205>`_, |
| 292 | + `#3207 <https://github.com/fmtlib/fmt/pull/3207>`_, |
| 293 | + `#3210 <https://github.com/fmtlib/fmt/pull/3210>`_, |
| 294 | + `#3240 <https://github.com/fmtlib/fmt/pull/3240>`_, |
206 | 295 | `#3299 <https://github.com/fmtlib/fmt/issues/3299>`_, |
207 | 296 | `#3302 <https://github.com/fmtlib/fmt/pull/3302>`_, |
208 | 297 | `#3317 <https://github.com/fmtlib/fmt/issues/3317>`_, |
|
211 | 300 | `#3395 <https://github.com/fmtlib/fmt/pull/3395>`_, |
212 | 301 | `#3406 <https://github.com/fmtlib/fmt/pull/3406>`_, |
213 | 302 | `#3411 <https://github.com/fmtlib/fmt/pull/3411>`_). |
214 | | - Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_, |
| 303 | + Thanks `@dimztimz (Dimitrij Mijoski) <https://github.com/dimztimz>`_, |
| 304 | + `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_, |
| 305 | + `@DavidKorczynski <https://github.com/DavidKorczynski>`_, |
| 306 | + `@ChrisThrasher (Chris Thrasher) <https://github.com/ChrisThrasher>`_, |
215 | 307 | `@joycebrum (Joyce) <https://github.com/joycebrum>`_, |
216 | 308 | `@kevinhwang (Kevin Hwang) <https://github.com/kevinhwang>`_, |
217 | 309 | `@Vertexwahn <https://github.com/Vertexwahn>`_. |
|
230 | 322 | (`#3068 <https://github.com/fmtlib/fmt/pull/3068>`_). |
231 | 323 |
|
232 | 324 | * Fixed various warnings and compilation issues |
233 | | - (`#3092 <https://github.com/fmtlib/fmt/issues/3092>`_, |
| 325 | + (`#3057 <https://github.com/fmtlib/fmt/pull/3057>`_, |
| 326 | + `#3066 <https://github.com/fmtlib/fmt/pull/3066>`_, |
| 327 | + `#3072 <https://github.com/fmtlib/fmt/pull/3072>`_, |
| 328 | + `#3082 <https://github.com/fmtlib/fmt/pull/3082>`_, |
| 329 | + `#3091 <https://github.com/fmtlib/fmt/pull/3091>`_, |
| 330 | + `#3092 <https://github.com/fmtlib/fmt/issues/3092>`_, |
| 331 | + `#3093 <https://github.com/fmtlib/fmt/pull/3093>`_, |
| 332 | + `#3095 <https://github.com/fmtlib/fmt/pull/3095>`_, |
234 | 333 | `#3096 <https://github.com/fmtlib/fmt/issues/3096>`_, |
| 334 | + `#3097 <https://github.com/fmtlib/fmt/pull/3097>`_, |
235 | 335 | `#3128 <https://github.com/fmtlib/fmt/issues/3128>`_, |
| 336 | + `#3129 <https://github.com/fmtlib/fmt/pull/3129>`_, |
| 337 | + `#3137 <https://github.com/fmtlib/fmt/pull/3137>`_, |
| 338 | + `#3139 <https://github.com/fmtlib/fmt/pull/3139>`_, |
236 | 339 | `#3140 <https://github.com/fmtlib/fmt/issues/3140>`_, |
| 340 | + `#3142 <https://github.com/fmtlib/fmt/pull/3142>`_, |
237 | 341 | `#3149 <https://github.com/fmtlib/fmt/issues/3149>`_, |
| 342 | + `#3150 <https://github.com/fmtlib/fmt/pull/3150>`_, |
238 | 343 | `#3154 <https://github.com/fmtlib/fmt/issues/3154>`_, |
239 | 344 | `#3163 <https://github.com/fmtlib/fmt/issues/3163>`_, |
240 | 345 | `#3178 <https://github.com/fmtlib/fmt/issues/3178>`_, |
| 346 | + `#3184 <https://github.com/fmtlib/fmt/pull/3184>`_, |
| 347 | + `#3196 <https://github.com/fmtlib/fmt/pull/3196>`_, |
241 | 348 | `#3204 <https://github.com/fmtlib/fmt/issues/3204>`_, |
| 349 | + `#3206 <https://github.com/fmtlib/fmt/pull/3206>`_, |
242 | 350 | `#3208 <https://github.com/fmtlib/fmt/pull/3208>`_, |
243 | 351 | `#3213 <https://github.com/fmtlib/fmt/issues/3213>`_, |
| 352 | + `#3216 <https://github.com/fmtlib/fmt/pull/3216>`_, |
244 | 353 | `#3224 <https://github.com/fmtlib/fmt/issues/3224>`_, |
245 | 354 | `#3226 <https://github.com/fmtlib/fmt/issues/3226>`_, |
246 | 355 | `#3228 <https://github.com/fmtlib/fmt/issues/3228>`_, |
|
268 | 377 | `#3413 <https://github.com/fmtlib/fmt/pull/3413>`_, |
269 | 378 | `#3415 <https://github.com/fmtlib/fmt/issues/3415>`_). |
270 | 379 | Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_, |
| 380 | + `@gsjaardema (Greg Sjaardema) <https://github.com/gsjaardema>`_, |
| 381 | + `@NewbieOrange <https://github.com/NewbieOrange>`_, |
| 382 | + `@EngineLessCC (VivyaCC) <https://github.com/EngineLessCC>`_, |
| 383 | + `@asmaloney (Andy Maloney) <https://github.com/asmaloney>`_, |
| 384 | + `@HazardyKnusperkeks (Björn Schäpers) |
| 385 | + <https://github.com/HazardyKnusperkeks>`_, |
271 | 386 | `@sergiud (Sergiu Deitsch) <https://github.com/sergiud>`_, |
| 387 | + `@Youw (Ihor Dutchak) <https://github.com/Youw>`_, |
| 388 | + `@thesmurph <https://github.com/thesmurph>`_, |
272 | 389 | `@czudziakm (Maksymilian Czudziak) <https://github.com/czudziakm>`_, |
273 | 390 | `@chronoxor (Ivan Shynkarenka) <https://github.com/chronoxor>`_, |
274 | 391 | `@ShawnZhong (Shawn Zhong) <https://github.com/ShawnZhong>`_, |
|
0 commit comments