From 23e3a2eee8d995811847c54d107a7696b82aad6f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 3 Jul 2020 19:39:08 -0700 Subject: [PATCH] Update changelog --- ChangeLog.rst | 75 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 17 deletions(-) diff --git a/ChangeLog.rst b/ChangeLog.rst index cee62ae0..4c1edf53 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -5,6 +5,11 @@ statically linked with {fmt} shrank from ~368k to less than 100k: http://www.zverovich.net/2020/05/21/reducing-library-size.html +* Optimized integer formatting: ``format_to`` with format string compilation + and a stack-allocated buffer is now faster than both libc++ and libstdc++ + ``to_chars`` + (http://www.zverovich.net/2020/06/13/fast-int-to-string-revisited.html). + * Applied extern templates to improve compile times when using the core API and ``fmt/format.h`` (`#1452 `_). For example, on macOS with clang the compile time dropped from 2.3s to 0.3s @@ -74,14 +79,6 @@ .L.str.1: .asciz "answer" -* Added support for named args, ``clear`` and ``reserve`` to - ``dynamic_format_arg_store`` - (`#1655 `_, - `#1663 `_, - `#1677 `_). - Thanks `@vsolontsov-ll (Vladimir Solontsov) - `_. - * Implemented compile-time checks for dynamic width and precision (`#1614 `_): @@ -106,14 +103,47 @@ if (id >= num_args_) on_error("argument not found"); ^ +* Added sentinel support to ``fmt::join`` + (`#1689 `_)) + + .. code:: c++ + + struct zstring_sentinel {}; + bool operator==(const char* p, zstring_sentinel) { return *p == '\0'; } + bool operator!=(const char* p, zstring_sentinel) { return *p != '\0'; } + + struct zstring { + const char* p; + const char* begin() const { return p; } + zstring_sentinel end() const { return {}; } + }; + + auto s = fmt::format("{}", fmt::join(zstring{"hello"}, "_")); + // s == "h_e_l_l_o" + + Thanks `@BRevzin (Barry Revzin) `_. + +* Added support for named args, ``clear`` and ``reserve`` to + ``dynamic_format_arg_store`` + (`#1655 `_, + `#1663 `_, + `#1677 `_). + Thanks `@vsolontsov-ll (Vladimir Solontsov) + `_. + +* Added support for the ``'c'`` format specifier to integral types for + compatibility with ``std::format`` + (`#1652 `_). + * Implemented the ``'L'`` format specifier for locale-specific formatting of floating-point numbers for compatibility with ``std::format`` (`#1624 `_). The ``'n'`` specifier is now disabled by default but can be enabled via the ``FMT_DEPRECATED_N_SPECIFIER`` macro. -* The ``'='`` format specifier is now deprecated and will be removed in a future - version for compatibility with ``std::format``. +* The ``'='`` format specifier is now disabled by default for compatibility with + ``std::format``. It can be enabled via the ``FMT_DEPRECATED_NUMERIC_ALIGN`` + macro. * Optimized handling of small format strings. For example, @@ -133,7 +163,8 @@ * Improved compatibility between ``fmt::printf`` with the standard specs (`#1595 `_, `#1683 `_, - `#1687 `_). + `#1687 `_, + `#1699 `_). Thanks `@rimathia `_. * Fixed handling of ``operator<<` overloads that use ``copyfmt`` @@ -164,14 +195,19 @@ (`#704 `_, `#1643 `_, `#1660 `_, - `#1681 `_). + `#1681 `_, + `#1691 `_). Thanks `@senior7515 (Alexander Gallego) `_, `@lsr0 (Lindsay Roberts) `_, - `@puetzk (Kevin Puetz) `_. + `@puetzk (Kevin Puetz) `_, + `@fpelliccioni (Fernando Pelliccioni ) `_, + Alexey Kuzmenko. * Implemented various build configuration fixes and improvements - (`#1657 `_). - Thanks `@jtojnar (Jan Tojnar) `_. + (`#1657 `_, + `#1702 `_). + Thanks `@jtojnar (Jan Tojnar) `_, + `@orivej (Orivej Desh) `_. * Fixed various warnings and compilation issues (`#1616 `_, @@ -185,14 +221,19 @@ `#1658 `_, `#1661 `_, `#1667 `_, - `#1669 `_). + `#1669 `_, + `#1692 `_, + `#1696 `_, + `#1697 `_). Thanks `@gsjaardema (Greg Sjaardema) `_, `@gabime (Gabi Melman) `_, `@johnor (Johan) `_, `@gabime (Dmitry Kurkin) `_, `@invexed (James Beach) `_, `@peterbell10 `_, - `@daixtrose (Markus Werle) `_. + `@daixtrose (Markus Werle) `_, + `@petrutlucian94 (Lucian Petrut) `_, + `@Neargye (Daniil Goncharov) `_. 6.2.1 - 2020-05-09 ------------------