`#1786 <https://github.com/fmtlib/fmt/pull/1786)>`_) For example
(`godbolt <https://godbolt.org/z/jTzrPT>`__):
`#1786 <https://github.com/fmtlib/fmt/pull/1786)>`_). For example
(`godbolt <https://godbolt.org/z/jP63Tv>`__):
.. code:: c++
...
...
@@ -133,6 +152,20 @@
MY_LOG("invalid squishiness: {}", 42);
* Replaced ``snprintf`` fallback with a faster internal IEEE 754 ``float`` and
``double`` formatter for arbitrary precision. For example
(`godbolt <https://godbolt.org/z/dPhWvj>`__):
.. code:: c++
#include <fmt/core.h>
int main() {
fmt::print("{:.500}\n", 4.9406564584124654E-324);
}
prints 4.9406564584124654417656879286822137236505980261432476442558568250067550727020875186529983636163599237979656469544571773092665671035593979639877479601078187812630071319031140452784581716784898210368871863605699873072305000638740915356498438731247339727316961514003171538539807412623856559117102665855668676818703956031062493194527159149245532930545654440112748012970999954193198940908041656332452475714786901472678015935523861155013480352649347201937902681071074917033322268447533357208324319360923829e-324.
* Made ``format_to_n`` and ``formatted_size`` part of the `core API
<https://fmt.dev/latest/api.html#core-api>`__
(`godbolt <https://godbolt.org/z/33Pzo3>`__):
...
...
@@ -146,6 +179,43 @@
auto end = fmt::format_to_n(buf, sizeof(buf), "{}", 42);
}
* Added ``fmt::format_to_n`` overload with format string compilation