From 62c72059d93a59cfa55d1e2492edcd740f939f70 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 25 Oct 2020 08:56:46 -0700 Subject: [PATCH] Update changelog --- ChangeLog.rst | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/ChangeLog.rst b/ChangeLog.rst index 71ccfa1c..f880c4af 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,15 +1,17 @@ 7.1.0 - TBD ----------- -* Switched from Grisu3 to `Dragonbox `_ - for the default floating-point formatting which gives the shortest decimal - representation with round-trip and correct rounding guarantees +* Switched from `Grisu3 + `_ + to `Dragonbox `_ for the default + floating-point formatting which gives the shortest decimal representation + with round-trip guarantee and correct rounding (`#1882 `_, `#1887 `_, `#1894 `_). This makes {fmt} up to 20-30x faster than common implementations of ``std::ostringstream`` and ``sprintf`` on `dtoa-benchmark `_ - and faster than double-conversion and ryu: + and faster than double-conversion and Ryū: .. image:: https://user-images.githubusercontent.com/576385/ 95684665-11719600-0ba8-11eb-8e5b-972ff4e49428.png @@ -20,8 +22,9 @@ Thanks `@jk-jeon (Junekey Jeon) `_. * Added an experimental unsynchronized file output API which, together with - the format string compilation, can give `5-9 times speed up compared to - fprintf `_ + `format string compilation `_, + can give `5-9 times speed up compared to fprintf + `_ on common platforms (`godbolt `__): .. code:: c++ @@ -127,12 +130,12 @@ fmt/core.h:1438:3: error: static_assert failed due to requirement 'fmt::v7::formattable()' "Cannot format an argument. To make type T formattable provide a formatter specialization: - https://fmt.dev/dev/api.html#udt" + https://fmt.dev/latest/api.html#udt" ... * Added the `make_args_checked `_ function template that allows you to write formatting functions with - compile-time format string checks + compile-time format string checks and avoid binary code bloat (`godbolt `__): .. code:: c++ @@ -166,34 +169,36 @@ fmt::print("{:.500}\n", 4.9406564584124654E-324); } - prints ``4.9406564584124654417656879286822137236505980261432476442558568250067550727020875186529983636163599237979656469544571773092665671035593979639877479601078187812630071319031140452784581716784898210368871863605699873072305000638740915356498438731247339727316961514003171538539807412623856559117102665855668676818703956031062493194527159149245532930545654440112748012970999954193198940908041656332452475714786901472678015935523861155013480352649347201937902681071074917033322268447533357208324319360923829e-324``. + prints + + ``4.9406564584124654417656879286822137236505980261432476442558568250067550727020875186529983636163599237979656469544571773092665671035593979639877479601078187812630071319031140452784581716784898210368871863605699873072305000638740915356498438731247339727316961514003171538539807412623856559117102665855668676818703956031062493194527159149245532930545654440112748012970999954193198940908041656332452475714786901472678015935523861155013480352649347201937902681071074917033322268447533357208324319360923829e-324``. * Made ``format_to_n`` and ``formatted_size`` part of the `core API `__ - (`godbolt `__): + (`godbolt `__): .. code:: c++ #include int main() { - char buf[10]; - auto end = fmt::format_to_n(buf, sizeof(buf), "{}", 42); + char buffer[10]; + auto result = fmt::format_to_n(buffer, sizeof(buffer), "{}", 42); } * Added ``fmt::format_to_n`` overload with format string compilation (`#1764 `_, `#1767 `_, `#1869 `_). For example - (`godbolt `__): + (`godbolt `__): .. code:: c++ #include int main() { - char buf[8]; - fmt::format_to_n(buf, sizeof(buf), FMT_COMPILE("{}"), 42); + char buffer[8]; + fmt::format_to_n(buffer, sizeof(buffer), FMT_COMPILE("{}"), 42); } Thanks `@Kurkin (Dmitry Kurkin) `_, @@ -218,7 +223,7 @@ Thanks `@Naios (Denis Blank) `_. -* Made `#` emit trailing zeros +* Made the `#` specifier emit trailing zeros in addition to the decimal point (`#1797 `_). For example (`godbolt `__): @@ -241,7 +246,7 @@ * Fixed an issue with floating-point formatting that could result in addition of a non-significant trailing zero in rare cases e.g. ``1.00e-34`` instead of ``1.0e-34`` (`#1873 `_, - `#1917 `_). + `#1917 `_). * Made ``fmt::to_string`` fallback on ``ostream`` insertion operator if the ``formatter`` specialization is not provided @@ -256,7 +261,7 @@ Thanks `@t-wiser `_. * Fixed handling of types that have both an implicit conversion operator and - an overloaded `ostream` insertion operator + an overloaded ``ostream`` insertion operator (`#1766 `_). * Fixed a slicing issue in an internal iterator type @@ -288,7 +293,8 @@ `#1792 `_, `#1838 `_, `#1888 `_, - `#1918 `_). + `#1918 `_, + `#1939 `_). Thanks `@leolchat (Léonard Gérard) `_, `@pepsiman (Malcolm Parsons) `_, `@Klaim (Joël Lamotte) `_,