diff --git a/ChangeLog.rst b/ChangeLog.rst index 4bef8ab9b84c..921f7e1517c5 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,10 +1,11 @@ -10.0.0 - TBD ------------- +10.0.0 - 2023-05-09 +------------------- * Replaced Grisu with a new floating-point formatting algorithm for given precision (`#3262 `_, `#2750 `_, - `#3269 `_). + `#3269 `_, + `#3276 `_). The new algorithm is based on Dragonbox already used for the shortest representation and gives substantial performance improvement: @@ -20,6 +21,7 @@ * Replaced ``snprintf``-based hex float formatter with an internal implementation (`#3179 `_, `#3203 `_). + This removes the last usage of ``s(n)printf`` in {fmt}. Thanks `@phprus (Vladislav Shchapov) `_. * Fixed alignment of floating-point numbers with localization @@ -69,7 +71,8 @@ * Added support for fill, align and width to the time point formatter (`#3237 `_, - `#3260 `_). + `#3260 `_, + `#3275 `_). For example (`godbolt `__): .. code:: c++ @@ -105,7 +108,7 @@ `@phprus (Vladislav Shchapov) `_, `@BRevzin (Barry Revzin) `_. -* Add precision support to ``%S`` +* Added precision support to ``%S`` (`#3148 `_). Thanks `@SappyJoy (Stepan Ponomaryov) `_ @@ -125,11 +128,33 @@ `#3222 `_). Thanks `@phprus (Vladislav Shchapov) `_. -* Improved validation of format specifiers for `std::chrono::duration` +* Improved validation of format specifiers for ``std::chrono::duration`` (`#3219 `_, `#3232 `_). Thanks `@ShawnZhong (Shawn Zhong) `_. +* Fixed formatting of time points before the epoch + (`#3117 `_, + `#3261 `_). + For example (`godbolt `__): + + .. code:: c++ + + #include + + int main() { + auto t = std::chrono::system_clock::from_time_t(0) - + std::chrono::milliseconds(250); + fmt::print("{:%S}\n", t); // prints 59.750000000 + } + + Thanks `@ShawnZhong (Shawn Zhong) `_. + +* Experimental: implemented glibc extension for padding seconds, minutes and + hours (`#2959 `_, + `#3271 `_). + Thanks `@ShawnZhong (Shawn Zhong) `_. + * Added a formatter for ``std::exception`` (`#2977 `_, `#3012 `_, @@ -183,6 +208,9 @@ Thanks `@ShawnZhong (Shawn Zhong) `_. +* Added a formatter for ``std::optional`` to ``fmt/std.h``. + Thanks `@tom-huntington `_. + * Fixed formatting of valueless by exception variants (`#3347 `_). Thanks `@TheOmegaCarrot `_. @@ -205,22 +233,9 @@ * Improved handling of invalid Unicode in paths. -* Fixed formatting of time points before the epoch - (`#3117 `_, - `#3261 `_). - For example (`godbolt `__): - - .. code:: c++ - - #include - - int main() { - auto t = std::chrono::system_clock::from_time_t(0) - - std::chrono::milliseconds(250); - fmt::print("{:%S}\n", t); // prints 59.750000000 - } - - Thanks `@ShawnZhong (Shawn Zhong) `_. +* Enabled compile-time checks on Apple clang 14 and later + (`#3331 `_). + Thanks `@cloyce (Cloyce D. Spradling) `_. * Improved compile-time checks of named arguments (`#3105 `_, @@ -274,6 +289,13 @@ ``basic_format_string`` (`#3111 `_). Thanks `@huangqinjin `_. +* Added ``println`` for compatibility with C++23 + (`#3267 `_). + Thanks `@ShawnZhong (Shawn Zhong) `_. + +* Renamed the ``FMT_EXPORT`` macro for shared library usage to + ``FMT_LIB_EXPORT``. + * Improved documentation (`#3108 `_, `#3169 `_, @@ -292,10 +314,15 @@ `#3207 `_, `#3210 `_, `#3240 `_, + `#3256 `_, + `#3264 `_, `#3299 `_, `#3302 `_, + `#3312 `_, `#3317 `_, `#3328 `_, + `#3333 `_, + `#3369 `_, `#3373 `_, `#3395 `_, `#3406 `_, @@ -304,11 +331,16 @@ `@phprus (Vladislav Shchapov) `_, `@DavidKorczynski `_, `@ChrisThrasher (Chris Thrasher) `_, + `@FrancoisCarouge (François Carouge) `_, + `@kennyweiss (Kenny Weiss) `_, + `@luzpaz `_, + `@codeinred (Alecto Irene Perez) `_, + `@Mixaill (Mikhail Paulyshka) `_, `@joycebrum (Joyce) `_, `@kevinhwang (Kevin Hwang) `_, `@Vertexwahn `_. -* Fixed a regression in handling empty format specifiers after a colon (`{:}`) +* Fixed a regression in handling empty format specifiers after a colon (``{:}``) (`#3086 `_). Thanks `@oxidase (Michael Krasnyk) `_. @@ -354,11 +386,13 @@ `#3226 `_, `#3228 `_, `#3229 `_, + `#3259 `_, `#3274 `_, `#3287 `_, `#3288 `_, `#3292 `_, `#3295 `_, + `#3296 `_, `#3298 `_, `#3325 `_, `#3326 `_, @@ -370,6 +404,7 @@ `#3362 `_, `#3365 `_, `#3366 `_, + `#3374 `_, `#3377 `_, `#3378 `_, `#3381 `_, @@ -387,8 +422,10 @@ `@Youw (Ihor Dutchak) `_, `@thesmurph `_, `@czudziakm (Maksymilian Czudziak) `_, + `@Roman-Koshelev `_, `@chronoxor (Ivan Shynkarenka) `_, `@ShawnZhong (Shawn Zhong) `_, + `@russelltg (Russell Greene) `_, `@glebm (Gleb Mazovetskiy) `_, `@tmartin-gh `_, `@Zhaojun-Liu (June Liu) `_, diff --git a/doc/build.py b/doc/build.py index 1c993d517899..29d70adab294 100755 --- a/doc/build.py +++ b/doc/build.py @@ -4,7 +4,7 @@ import errno, os, re, sys from subprocess import check_call, CalledProcessError, Popen, PIPE, STDOUT -versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', '5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0', '6.1.0', '6.1.1', '6.1.2', '6.2.0', '6.2.1', '7.0.0', '7.0.1', '7.0.2', '7.0.3', '7.1.0', '7.1.1', '7.1.2', '7.1.3', '8.0.0', '8.0.1', '8.1.0', '8.1.1', '9.0.0', '9.1.0'] +versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', '5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0', '6.1.0', '6.1.1', '6.1.2', '6.2.0', '6.2.1', '7.0.0', '7.0.1', '7.0.2', '7.0.3', '7.1.0', '7.1.1', '7.1.2', '7.1.3', '8.0.0', '8.0.1', '8.1.0', '8.1.1', '9.0.0', '9.1.0', '10.0.0'] class Pip: def __init__(self, venv_dir): diff --git a/include/fmt/core.h b/include/fmt/core.h index 06477a813edb..46723d598865 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -17,7 +17,7 @@ #include // The fmt library version in the form major * 10000 + minor * 100 + patch. -#define FMT_VERSION 90101 +#define FMT_VERSION 100000 #if defined(__clang__) && !defined(__ibmxl__) # define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) @@ -175,7 +175,7 @@ #ifndef FMT_BEGIN_NAMESPACE # define FMT_BEGIN_NAMESPACE \ namespace fmt { \ - inline namespace v9 { + inline namespace v10 { # define FMT_END_NAMESPACE \ } \ }