Lines Matching full:fmt
5 (`#1996 <https://github.com/fmtlib/fmt/issues/1996>`_,
6 `#2029 <https://github.com/fmtlib/fmt/issues/2029>`_).
9 (`#2011 <https://github.com/fmtlib/fmt/issues/2011>`_).
12 (`#2014 <https://github.com/fmtlib/fmt/issues/2014>`_).
15 (`#2017 <https://github.com/fmtlib/fmt/issues/2017>`_).
21 (`#1976 <https://github.com/fmtlib/fmt/issues/1976>`_).
27 (`#1961 <https://github.com/fmtlib/fmt/issues/1961>`_).
31 (`#1919 <https://github.com/fmtlib/fmt/issues/1919>`_).
34 (`#1957 <https://github.com/fmtlib/fmt/issues/1957>`_).
37 (`#1955 <https://github.com/fmtlib/fmt/issues/1955>`_).
40 (`#1968 <https://github.com/fmtlib/fmt/pull/1968>`_).
44 (`#1964 <https://github.com/fmtlib/fmt/pull/1964>`_).
55 (`#1882 <https://github.com/fmtlib/fmt/pull/1882>`_,
56 `#1887 <https://github.com/fmtlib/fmt/pull/1887>`_,
57 `#1894 <https://github.com/fmtlib/fmt/pull/1894>`_). This makes {fmt} up to
71 `format string compilation <https://fmt.dev/latest/api.html#compile-api>`_,
78 #include <fmt/os.h>
81 auto f = fmt::output_file("guide");
86 (`#1819 <https://github.com/fmtlib/fmt/issues/1819>`_,
87 `#1837 <https://github.com/fmtlib/fmt/pull/1837>`_). For example
92 #include <fmt/chrono.h>
96 fmt::print("The time is {:%H:%M:%S}.\n", now);
101 * Added support for ranges with non-const ``begin``/``end`` to ``fmt::join``
102 (`#1784 <https://github.com/fmtlib/fmt/issues/1784>`_,
103 `#1786 <https://github.com/fmtlib/fmt/pull/1786>`_). For example
108 #include <fmt/ranges.h>
117 fmt::print("{}\n", fmt::join(range, ""));
125 (`#1806 <https://github.com/fmtlib/fmt/pull/1806>`_).
132 #include <fmt/compile.h>
135 return fmt::format_to(buf, FMT_COMPILE("x{}"), 42);
159 (`#1809 <https://github.com/fmtlib/fmt/issues/1809>`_).
166 #include <fmt/core.h>
171 fmt::print("{}", how_about_no());
176 ``fmt/core.h:1438:3: error: static_assert failed due to requirement
177 'fmt::v7::formattable<how_about_no>()' "Cannot format an argument.
179 https://fmt.dev/latest/api.html#udt"
182 * Added the `make_args_checked <https://fmt.dev/7.1.0/api.html#argument-lists>`_
189 void vlog(const char* file, int line, fmt::string_view format,
190 fmt::format_args args) {
191 fmt::print("{}: {}: ", file, line);
192 fmt::vprint(format, args);
198 fmt::make_args_checked<Args...>(format, args...));
212 #include <fmt/core.h>
215 fmt::print("{:.500}\n", 4.9406564584124654E-324);
223 <https://fmt.dev/latest/api.html#core-api>`__
228 #include <fmt/core.h>
232 auto result = fmt::format_to_n(buffer, sizeof(buffer), "{}", 42);
235 * Added ``fmt::format_to_n`` overload with format string compilation
236 (`#1764 <https://github.com/fmtlib/fmt/issues/1764>`_,
237 `#1767 <https://github.com/fmtlib/fmt/pull/1767>`_,
238 `#1869 <https://github.com/fmtlib/fmt/pull/1869>`_). For example
243 #include <fmt/compile.h>
247 fmt::format_to_n(buffer, sizeof(buffer), FMT_COMPILE("{}"), 42);
253 * Added ``fmt::format_to`` overload that take ``text_style``
254 (`#1593 <https://github.com/fmtlib/fmt/issues/1593>`_,
255 `#1842 <https://github.com/fmtlib/fmt/issues/1842>`_,
256 `#1843 <https://github.com/fmtlib/fmt/pull/1843>`_). For example
261 #include <fmt/color.h>
265 fmt::format_to(std::back_inserter(out),
266 fmt::emphasis::bold | fg(fmt::color::red),
273 (`#1797 <https://github.com/fmtlib/fmt/issues/1797>`_). For example
278 #include <fmt/core.h>
281 fmt::print("{:#.2g}", 0.5);
288 (`#1893 <https://github.com/fmtlib/fmt/issues/1893>`_,
289 `#1943 <https://github.com/fmtlib/fmt/issues/1943>`_). It is possible to get
294 ``1.0e-34`` (`#1873 <https://github.com/fmtlib/fmt/issues/1873>`_,
295 `#1917 <https://github.com/fmtlib/fmt/issues/1917>`_).
297 * Made ``fmt::to_string`` fallback on ``ostream`` insertion operator if
299 (`#1815 <https://github.com/fmtlib/fmt/issues/1815>`_,
300 `#1829 <https://github.com/fmtlib/fmt/pull/1829>`_).
305 (`#1847 <https://github.com/fmtlib/fmt/pull/1847>`_,
306 `#1848 <https://github.com/fmtlib/fmt/pull/1848>`_).
311 (`#1766 <https://github.com/fmtlib/fmt/issues/1766>`_).
314 (`#1822 <https://github.com/fmtlib/fmt/pull/1822>`_).
318 (`#1927 <https://github.com/fmtlib/fmt/issues/1927>`_).
321 (`#1870 <https://github.com/fmtlib/fmt/issues/1870>`_,
322 `#1932 <https://github.com/fmtlib/fmt/issues/1932>`_).
325 (`#1878 <https://github.com/fmtlib/fmt/pull/1878>`_).
329 (`#1900 <https://github.com/fmtlib/fmt/pull/1900>`_).
333 (`#1890 <https://github.com/fmtlib/fmt/pull/1890>`_).
337 (`#1772 <https://github.com/fmtlib/fmt/issues/1772>`_,
338 `#1775 <https://github.com/fmtlib/fmt/pull/1775>`_,
339 `#1792 <https://github.com/fmtlib/fmt/pull/1792>`_,
340 `#1838 <https://github.com/fmtlib/fmt/pull/1838>`_,
341 `#1888 <https://github.com/fmtlib/fmt/pull/1888>`_,
342 `#1918 <https://github.com/fmtlib/fmt/pull/1918>`_,
343 `#1939 <https://github.com/fmtlib/fmt/pull/1939>`_).
354 (`#1778 <https://github.com/fmtlib/fmt/issues/1778>`_,
355 `#1781 <https://github.com/fmtlib/fmt/pull/1781>`_).
359 namespaces (`#1945 <https://github.com/fmtlib/fmt/pull/1945>`_).
363 (`#1760 <https://github.com/fmtlib/fmt/pull/1760>`_,
364 `#1770 <https://github.com/fmtlib/fmt/pull/1770>`_,
365 `#1779 <https://github.com/fmtlib/fmt/issues/1779>`_,
366 `#1783 <https://github.com/fmtlib/fmt/pull/1783>`_,
367 `#1823 <https://github.com/fmtlib/fmt/pull/1823>`_).
375 (`#1790 <https://github.com/fmtlib/fmt/pull/1790>`_,
376 `#1802 <https://github.com/fmtlib/fmt/pull/1802>`_,
377 `#1808 <https://github.com/fmtlib/fmt/pull/1808>`_,
378 `#1810 <https://github.com/fmtlib/fmt/issues/1810>`_,
379 `#1811 <https://github.com/fmtlib/fmt/issues/1811>`_,
380 `#1812 <https://github.com/fmtlib/fmt/pull/1812>`_,
381 `#1814 <https://github.com/fmtlib/fmt/pull/1814>`_,
382 `#1816 <https://github.com/fmtlib/fmt/pull/1816>`_,
383 `#1817 <https://github.com/fmtlib/fmt/pull/1817>`_,
384 `#1818 <https://github.com/fmtlib/fmt/pull/1818>`_,
385 `#1825 <https://github.com/fmtlib/fmt/issues/1825>`_,
386 `#1836 <https://github.com/fmtlib/fmt/pull/1836>`_,
387 `#1855 <https://github.com/fmtlib/fmt/pull/1855>`_,
388 `#1856 <https://github.com/fmtlib/fmt/pull/1856>`_,
389 `#1860 <https://github.com/fmtlib/fmt/pull/1860>`_,
390 `#1877 <https://github.com/fmtlib/fmt/pull/1877>`_,
391 `#1879 <https://github.com/fmtlib/fmt/pull/1879>`_,
392 `#1880 <https://github.com/fmtlib/fmt/pull/1880>`_,
393 `#1896 <https://github.com/fmtlib/fmt/issues/1896>`_,
394 `#1897 <https://github.com/fmtlib/fmt/pull/1897>`_,
395 `#1898 <https://github.com/fmtlib/fmt/pull/1898>`_,
396 `#1904 <https://github.com/fmtlib/fmt/issues/1904>`_,
397 `#1908 <https://github.com/fmtlib/fmt/pull/1908>`_,
398 `#1911 <https://github.com/fmtlib/fmt/issues/1911>`_,
399 `#1912 <https://github.com/fmtlib/fmt/issues/1912>`_,
400 `#1928 <https://github.com/fmtlib/fmt/issues/1928>`_,
401 `#1929 <https://github.com/fmtlib/fmt/pull/1929>`_,
402 `#1935 <https://github.com/fmtlib/fmt/issues/1935>`_
403 `#1937 <https://github.com/fmtlib/fmt/pull/1937>`_,
404 `#1942 <https://github.com/fmtlib/fmt/pull/1942>`_,
405 `#1949 <https://github.com/fmtlib/fmt/issues/1949>`_).
430 (`#1787 <https://github.com/fmtlib/fmt/issues/1787>`_).
433 (`#1796 <https://github.com/fmtlib/fmt/issues/1796>`_).
436 (`#1800 <https://github.com/fmtlib/fmt/pull/1800>`_).
440 (`#1782 <https://github.com/fmtlib/fmt/issues/1782>`_,
441 `#1801 <https://github.com/fmtlib/fmt/issues/1801>`_).
447 (`#1725 <https://github.com/fmtlib/fmt/issues/1725>`_).
450 (`#1779 <https://github.com/fmtlib/fmt/issues/1779>`_).
453 (`#1782 <https://github.com/fmtlib/fmt/issues/1782>`_).
461 (`#1753 <https://github.com/fmtlib/fmt/issues/1753>`_).
464 (`#1757 <https://github.com/fmtlib/fmt/issues/1757>`_).
473 statically linked with {fmt} `shrank from ~368k to less than 100k
477 <https://fmt.dev/7.0.0/api.html#compile-api>`_:
481 #include <fmt/compile.h>
485 std::string s = fmt::format(FMT_COMPILE("{}"), 42);
487 The old ``fmt::compile`` API is now deprecated.
498 fmt::format("Result: {}: ({},{},{},{})", str1, str2, str3, str4, str5)
500 is now ~40% faster (`#1685 <https://github.com/fmtlib/fmt/issues/1685>`_).
503 and ``fmt/format.h`` (`#1452 <https://github.com/fmtlib/fmt/issues/1452>`_).
528 It is still recommended to use ``fmt/core.h`` instead of ``fmt/format.h`` but
537 #include <fmt/core.h>
540 fmt::print("The answer is {answer}\n", fmt::arg("answer", 42));
563 call fmt::v6::vprint(fmt::v6::basic_string_view<char>,
564 fmt::v6::format_args)
573 (`#1614 <https://github.com/fmtlib/fmt/issues/1614>`_):
577 #include <fmt/format.h>
580 fmt::print(FMT_STRING("{0:{1}}"), 42);
586 include/fmt/format.h:2726:27: error: constexpr variable 'invalid_format' must be
591 include/fmt/core.h:569:26: note: in call to
596 * Added sentinel support to ``fmt::join``
597 (`#1689 <https://github.com/fmtlib/fmt/pull/1689>`_)
611 auto s = fmt::format("{}", fmt::join(zstring{"hello"}, "_"));
618 (`#1655 <https://github.com/fmtlib/fmt/issues/1655>`_,
619 `#1663 <https://github.com/fmtlib/fmt/pull/1663>`_,
620 `#1674 <https://github.com/fmtlib/fmt/pull/1674>`_,
621 `#1677 <https://github.com/fmtlib/fmt/pull/1677>`_).
627 (`#1652 <https://github.com/fmtlib/fmt/issues/1652>`_).
630 ``std::format`` (`#1624 <https://github.com/fmtlib/fmt/issues/1624>`_).
640 * ``FMT_STRING_ALIAS`` and ``fmt`` macros - replaced by ``FMT_STRING``
641 * ``fmt::basic_string_view::char_type`` - replaced by
642 ``fmt::basic_string_view::value_type``
651 (`#1538 <https://github.com/fmtlib/fmt/issues/1538>`_). The former is still
654 * Improved compatibility between ``fmt::printf`` with the standard specs
655 (`#1595 <https://github.com/fmtlib/fmt/issues/1595>`_,
656 `#1682 <https://github.com/fmtlib/fmt/pull/1682>`_,
657 `#1683 <https://github.com/fmtlib/fmt/pull/1683>`_,
658 `#1687 <https://github.com/fmtlib/fmt/pull/1687>`_,
659 `#1699 <https://github.com/fmtlib/fmt/pull/1699>`_).
663 (`#1666 <https://github.com/fmtlib/fmt/issues/1666>`_).
666 in the fmt target. This can be useful for embedded platforms
667 (`#1654 <https://github.com/fmtlib/fmt/issues/1654>`_,
668 `#1656 <https://github.com/fmtlib/fmt/pull/1656>`_).
673 macro to prevent interferring with fuzzing of projects using {fmt}
674 (`#1650 <https://github.com/fmtlib/fmt/pull/1650>`_).
678 (`#1636 <https://github.com/fmtlib/fmt/issues/1636>`_,
679 `#1637 <https://github.com/fmtlib/fmt/pull/1637>`_).
684 (`#704 <https://github.com/fmtlib/fmt/issues/704>`_,
685 `#1643 <https://github.com/fmtlib/fmt/pull/1643>`_,
686 `#1660 <https://github.com/fmtlib/fmt/pull/1660>`_,
687 `#1681 <https://github.com/fmtlib/fmt/pull/1681>`_,
688 `#1691 <https://github.com/fmtlib/fmt/pull/1691>`_,
689 `#1706 <https://github.com/fmtlib/fmt/pull/1706>`_,
690 `#1714 <https://github.com/fmtlib/fmt/pull/1714>`_,
691 `#1721 <https://github.com/fmtlib/fmt/pull/1721>`_,
692 `#1739 <https://github.com/fmtlib/fmt/pull/1739>`_,
693 `#1740 <https://github.com/fmtlib/fmt/pull/1740>`_,
694 `#1741 <https://github.com/fmtlib/fmt/pull/1741>`_,
695 `#1751 <https://github.com/fmtlib/fmt/pull/1751>`_).
707 (`#1603 <https://github.com/fmtlib/fmt/pull/1603>`_,
708 `#1657 <https://github.com/fmtlib/fmt/pull/1657>`_,
709 `#1702 <https://github.com/fmtlib/fmt/pull/1702>`_,
710 `#1728 <https://github.com/fmtlib/fmt/pull/1728>`_).
717 (`#1616 <https://github.com/fmtlib/fmt/pull/1616>`_,
718 `#1620 <https://github.com/fmtlib/fmt/issues/1620>`_,
719 `#1622 <https://github.com/fmtlib/fmt/issues/1622>`_,
720 `#1625 <https://github.com/fmtlib/fmt/issues/1625>`_,
721 `#1627 <https://github.com/fmtlib/fmt/pull/1627>`_,
722 `#1628 <https://github.com/fmtlib/fmt/issues/1628>`_,
723 `#1629 <https://github.com/fmtlib/fmt/pull/1629>`_,
724 `#1631 <https://github.com/fmtlib/fmt/issues/1631>`_,
725 `#1633 <https://github.com/fmtlib/fmt/pull/1633>`_,
726 `#1649 <https://github.com/fmtlib/fmt/pull/1649>`_,
727 `#1658 <https://github.com/fmtlib/fmt/issues/1658>`_,
728 `#1661 <https://github.com/fmtlib/fmt/pull/1661>`_,
729 `#1667 <https://github.com/fmtlib/fmt/pull/1667>`_,
730 `#1668 <https://github.com/fmtlib/fmt/issues/1668>`_,
731 `#1669 <https://github.com/fmtlib/fmt/pull/1669>`_,
732 `#1692 <https://github.com/fmtlib/fmt/issues/1692>`_,
733 `#1696 <https://github.com/fmtlib/fmt/pull/1696>`_,
734 `#1697 <https://github.com/fmtlib/fmt/pull/1697>`_,
735 `#1707 <https://github.com/fmtlib/fmt/issues/1707>`_,
736 `#1712 <https://github.com/fmtlib/fmt/pull/1712>`_,
737 `#1716 <https://github.com/fmtlib/fmt/pull/1716>`_,
738 `#1722 <https://github.com/fmtlib/fmt/pull/1722>`_,
739 `#1724 <https://github.com/fmtlib/fmt/issues/1724>`_,
740 `#1729 <https://github.com/fmtlib/fmt/pull/1729>`_,
741 `#1738 <https://github.com/fmtlib/fmt/pull/1738>`_,
742 `#1742 <https://github.com/fmtlib/fmt/issues/1742>`_,
743 `#1743 <https://github.com/fmtlib/fmt/issues/1743>`_,
744 `#1744 <https://github.com/fmtlib/fmt/pull/1744>`_,
745 `#1747 <https://github.com/fmtlib/fmt/issues/1747>`_,
746 `#1750 <https://github.com/fmtlib/fmt/pull/1750>`_).
766 (`#1631 <https://github.com/fmtlib/fmt/issues/1631>`_).
770 (`#1662 <https://github.com/fmtlib/fmt/issues/1662>`_).
780 fmt::format("{}", S());
784 include/fmt/core.h:1015:5: error: static_assert failed due to requirement
787 https://fmt.dev/latest/api.html#formatting-user-defined-types"
792 'fmt::v6::format<char [3], S, char>' requested here
793 fmt::format("{}", S());
801 (`#1476 <https://github.com/fmtlib/fmt/issues/1476>`_,
802 `#1498 <https://github.com/fmtlib/fmt/issues/1498>`_):
806 fmt::print("{:#.0f}", 42.0);
814 * Moved OS-specific APIs such as ``windows_error`` from ``fmt/format.h`` to
815 ``fmt/os.h``. You can define ``FMT_DEPRECATED_INCLUDE_OS`` to automatically
816 include ``fmt/os.h`` from ``fmt/format.h`` for compatibility but this will be
821 * Implemented detection of invalid use of ``fmt::arg``.
827 (`#1109 <https://github.com/fmtlib/fmt/issues/1109>`_):
831 fmt::print("┌{0:─^{2}}┐\n"
844 (`#1170 <https://github.com/fmtlib/fmt/issues/1170>`_,
845 `#1584 <https://github.com/fmtlib/fmt/pull/1584>`_):
849 fmt::dynamic_format_arg_store<fmt::format_context> store;
852 fmt::vprint("The {} is {}.\n", store);
861 * Made ``fmt::join`` accept ``initializer_list``
862 (`#1591 <https://github.com/fmtlib/fmt/pull/1591>`_).
866 (`#1588 <https://github.com/fmtlib/fmt/issues/1588>`_).
869 (`#1506 <https://github.com/fmtlib/fmt/issues/1506>`_).
872 (`#1533 <https://github.com/fmtlib/fmt/pull/1533>`_).
876 (`#1553 <https://github.com/fmtlib/fmt/pull/1553>`_).
882 (`#1590 <https://github.com/fmtlib/fmt/pull/1590>`_).
886 (`#1589 <https://github.com/fmtlib/fmt/pull/1589>`_).
890 (`#1560 <https://github.com/fmtlib/fmt/pull/1560>`_).
894 (`#1469 <https://github.com/fmtlib/fmt/pull/1469>`_,
895 `#1475 <https://github.com/fmtlib/fmt/pull/1475>`_,
896 `#1576 <https://github.com/fmtlib/fmt/pull/1576>`_).
902 (`#1481 <https://github.com/fmtlib/fmt/pull/1481>`_,
903 `#1523 <https://github.com/fmtlib/fmt/pull/1523>`_).
908 (`#1535 <https://github.com/fmtlib/fmt/pull/1535>`_).
912 (`#1264 <https://github.com/fmtlib/fmt/issues/1264>`_,
913 `#1460 <https://github.com/fmtlib/fmt/issues/1460>`_,
914 `#1534 <https://github.com/fmtlib/fmt/pull/1534>`_,
915 `#1536 <https://github.com/fmtlib/fmt/issues/1536>`_,
916 `#1545 <https://github.com/fmtlib/fmt/issues/1545>`_,
917 `#1546 <https://github.com/fmtlib/fmt/pull/1546>`_,
918 `#1566 <https://github.com/fmtlib/fmt/issues/1566>`_,
919 `#1582 <https://github.com/fmtlib/fmt/pull/1582>`_,
920 `#1597 <https://github.com/fmtlib/fmt/issues/1597>`_,
921 `#1598 <https://github.com/fmtlib/fmt/pull/1598>`_).
927 (`#1433 <https://github.com/fmtlib/fmt/pull/1433>`_,
928 `#1461 <https://github.com/fmtlib/fmt/issues/1461>`_,
929 `#1470 <https://github.com/fmtlib/fmt/pull/1470>`_,
930 `#1480 <https://github.com/fmtlib/fmt/pull/1480>`_,
931 `#1485 <https://github.com/fmtlib/fmt/pull/1485>`_,
932 `#1492 <https://github.com/fmtlib/fmt/pull/1492>`_,
933 `#1493 <https://github.com/fmtlib/fmt/issues/1493>`_,
934 `#1504 <https://github.com/fmtlib/fmt/issues/1504>`_,
935 `#1505 <https://github.com/fmtlib/fmt/pull/1505>`_,
936 `#1512 <https://github.com/fmtlib/fmt/pull/1512>`_,
937 `#1515 <https://github.com/fmtlib/fmt/issues/1515>`_,
938 `#1516 <https://github.com/fmtlib/fmt/pull/1516>`_,
939 `#1518 <https://github.com/fmtlib/fmt/pull/1518>`_,
940 `#1519 <https://github.com/fmtlib/fmt/pull/1519>`_,
941 `#1520 <https://github.com/fmtlib/fmt/pull/1520>`_,
942 `#1521 <https://github.com/fmtlib/fmt/pull/1521>`_,
943 `#1522 <https://github.com/fmtlib/fmt/pull/1522>`_,
944 `#1524 <https://github.com/fmtlib/fmt/issues/1524>`_,
945 `#1530 <https://github.com/fmtlib/fmt/pull/1530>`_,
946 `#1531 <https://github.com/fmtlib/fmt/issues/1531>`_,
947 `#1532 <https://github.com/fmtlib/fmt/pull/1532>`_,
948 `#1539 <https://github.com/fmtlib/fmt/issues/1539>`_,
949 `#1547 <https://github.com/fmtlib/fmt/issues/1547>`_,
950 `#1548 <https://github.com/fmtlib/fmt/issues/1548>`_,
951 `#1554 <https://github.com/fmtlib/fmt/pull/1554>`_,
952 `#1567 <https://github.com/fmtlib/fmt/issues/1567>`_,
953 `#1568 <https://github.com/fmtlib/fmt/pull/1568>`_,
954 `#1569 <https://github.com/fmtlib/fmt/pull/1569>`_,
955 `#1571 <https://github.com/fmtlib/fmt/pull/1571>`_,
956 `#1573 <https://github.com/fmtlib/fmt/pull/1573>`_,
957 `#1575 <https://github.com/fmtlib/fmt/pull/1575>`_,
958 `#1581 <https://github.com/fmtlib/fmt/pull/1581>`_,
959 `#1583 <https://github.com/fmtlib/fmt/issues/1583>`_,
960 `#1586 <https://github.com/fmtlib/fmt/issues/1586>`_,
961 `#1587 <https://github.com/fmtlib/fmt/issues/1587>`_,
962 `#1594 <https://github.com/fmtlib/fmt/issues/1594>`_,
963 `#1596 <https://github.com/fmtlib/fmt/pull/1596>`_,
964 `#1604 <https://github.com/fmtlib/fmt/issues/1604>`_,
965 `#1606 <https://github.com/fmtlib/fmt/pull/1606>`_,
966 `#1607 <https://github.com/fmtlib/fmt/issues/1607>`_,
967 `#1609 <https://github.com/fmtlib/fmt/issues/1609>`_).
989 (`#1471 <https://github.com/fmtlib/fmt/issues/1471>`_).
992 (`#1451 <https://github.com/fmtlib/fmt/pull/1451>`_).
998 (`#1440 <https://github.com/fmtlib/fmt/pull/1440>`_).
1005 (`#1443 <https://github.com/fmtlib/fmt/pull/1443>`_,
1006 `#1445 <https://github.com/fmtlib/fmt/issues/1445>`_,
1007 `#1446 <https://github.com/fmtlib/fmt/pull/1446>`_,
1008 `#1450 <https://github.com/fmtlib/fmt/issues/1450>`_).
1019 * {fmt} now formats IEEE 754 ``float`` and ``double`` using the shortest decimal
1025 #include <fmt/core.h>
1028 fmt::print("{}", M_PI);
1034 simplified it and improved performance. {fmt} is now 15 times faster than
1046 fmt 88.34 15.24x
1052 * {fmt} no longer converts ``float`` arguments to ``double``. In particular this
1054 ``fmt::format`` consistent with ``std::format`` specs
1055 (`#1336 <https://github.com/fmtlib/fmt/issues/1336>`_,
1056 `#1353 <https://github.com/fmtlib/fmt/issues/1353>`_,
1057 `#1360 <https://github.com/fmtlib/fmt/pull/1360>`_,
1058 `#1361 <https://github.com/fmtlib/fmt/pull/1361>`_):
1062 fmt::print("{}", 0.1f);
1069 (`#1376 <https://github.com/fmtlib/fmt/issues/1376>`_,
1070 `#1417 <https://github.com/fmtlib/fmt/issues/1417>`_).
1073 (`#1287 <https://github.com/fmtlib/fmt/pull/1287>`_):
1077 fmt::print("{}", std::numeric_limits<__int128_t>::max());
1085 (`#1351 <https://github.com/fmtlib/fmt/pull/1351>`_).
1090 ``fmt/core.h`` to ``fmt/format.h``.
1092 * Added an overload of ``fmt::join`` that works with tuples
1093 (`#1322 <https://github.com/fmtlib/fmt/issues/1322>`_,
1094 `#1330 <https://github.com/fmtlib/fmt/pull/1330>`_):
1099 #include <fmt/ranges.h>
1103 fmt::print("{}", t);
1114 fmt::print("{:#o}", 0);
1119 (`#1406 <https://github.com/fmtlib/fmt/pull/1406>`_):
1123 #include <fmt/locale.h>
1124 #include <fmt/ostream.h>
1135 auto s = fmt::format(std::locale("fr_FR.UTF-8"), "{}", S{0.42});
1142 (`#1393 <https://github.com/fmtlib/fmt/issues/1393>`_
1143 `#1394 <https://github.com/fmtlib/fmt/pull/1394>`_).
1147 ``const char**`` (`#1421 <https://github.com/fmtlib/fmt/issues/1421>`_):
1158 fmt::print("{}", str); // now compiles
1161 (`#1286 <https://github.com/fmtlib/fmt/pull/1286>`_).
1165 (`#1424 <https://github.com/fmtlib/fmt/issues/1424>`_).
1171 (`#1389 <https://github.com/fmtlib/fmt/issues/1389>`_,
1172 `#1390 <https://github.com/fmtlib/fmt/pull/1390>`_).
1175 * {fmt} can now be installed on Linux, macOS and Windows with
1178 `package <https://github.com/conda-forge/fmt-feedstock>`__
1179 (`#1410 <https://github.com/fmtlib/fmt/pull/1410>`_)::
1181 conda install -c conda-forge fmt
1185 * Added a CUDA test (`#1285 <https://github.com/fmtlib/fmt/pull/1285>`_,
1186 `#1317 <https://github.com/fmtlib/fmt/pull/1317>`_).
1190 * Improved documentation (`#1276 <https://github.com/fmtlib/fmt/pull/1276>`_,
1191 `#1291 <https://github.com/fmtlib/fmt/issues/1291>`_,
1192 `#1296 <https://github.com/fmtlib/fmt/issues/1296>`_,
1193 `#1315 <https://github.com/fmtlib/fmt/pull/1315>`_,
1194 `#1332 <https://github.com/fmtlib/fmt/pull/1332>`_,
1195 `#1337 <https://github.com/fmtlib/fmt/pull/1337>`_,
1196 `#1395 <https://github.com/fmtlib/fmt/issues/1395>`_
1197 `#1418 <https://github.com/fmtlib/fmt/pull/1418>`_).
1204 (`#1358 <https://github.com/fmtlib/fmt/pull/1358>`_,
1205 `#1407 <https://github.com/fmtlib/fmt/pull/1407>`_).
1210 (`#1292 <https://github.com/fmtlib/fmt/issues/1292>`_).
1213 (`#1377 <https://github.com/fmtlib/fmt/issues/1377>`_).
1216 (`#1273 <https://github.com/fmtlib/fmt/issues/1273>`_,
1217 `#1278 <https://github.com/fmtlib/fmt/pull/1278>`_,
1218 `#1280 <https://github.com/fmtlib/fmt/pull/1280>`_,
1219 `#1281 <https://github.com/fmtlib/fmt/issues/1281>`_,
1220 `#1288 <https://github.com/fmtlib/fmt/issues/1288>`_,
1221 `#1290 <https://github.com/fmtlib/fmt/pull/1290>`_,
1222 `#1301 <https://github.com/fmtlib/fmt/pull/1301>`_,
1223 `#1305 <https://github.com/fmtlib/fmt/issues/1305>`_,
1224 `#1306 <https://github.com/fmtlib/fmt/issues/1306>`_,
1225 `#1309 <https://github.com/fmtlib/fmt/issues/1309>`_,
1226 `#1312 <https://github.com/fmtlib/fmt/pull/1312>`_,
1227 `#1313 <https://github.com/fmtlib/fmt/issues/1313>`_,
1228 `#1316 <https://github.com/fmtlib/fmt/issues/1316>`_,
1229 `#1319 <https://github.com/fmtlib/fmt/issues/1319>`_,
1230 `#1320 <https://github.com/fmtlib/fmt/pull/1320>`_,
1231 `#1326 <https://github.com/fmtlib/fmt/pull/1326>`_,
1232 `#1328 <https://github.com/fmtlib/fmt/pull/1328>`_,
1233 `#1344 <https://github.com/fmtlib/fmt/issues/1344>`_,
1234 `#1345 <https://github.com/fmtlib/fmt/pull/1345>`_,
1235 `#1347 <https://github.com/fmtlib/fmt/pull/1347>`_,
1236 `#1349 <https://github.com/fmtlib/fmt/pull/1349>`_,
1237 `#1354 <https://github.com/fmtlib/fmt/issues/1354>`_,
1238 `#1362 <https://github.com/fmtlib/fmt/issues/1362>`_,
1239 `#1366 <https://github.com/fmtlib/fmt/issues/1366>`_,
1240 `#1364 <https://github.com/fmtlib/fmt/pull/1364>`_,
1241 `#1370 <https://github.com/fmtlib/fmt/pull/1370>`_,
1242 `#1371 <https://github.com/fmtlib/fmt/pull/1371>`_,
1243 `#1385 <https://github.com/fmtlib/fmt/issues/1385>`_,
1244 `#1388 <https://github.com/fmtlib/fmt/issues/1388>`_,
1245 `#1397 <https://github.com/fmtlib/fmt/pull/1397>`_,
1246 `#1414 <https://github.com/fmtlib/fmt/pull/1414>`_,
1247 `#1416 <https://github.com/fmtlib/fmt/pull/1416>`_,
1248 `#1422 <https://github.com/fmtlib/fmt/issues/1422>`_
1249 `#1427 <https://github.com/fmtlib/fmt/pull/1427>`_,
1250 `#1431 <https://github.com/fmtlib/fmt/issues/1431>`_,
1251 `#1433 <https://github.com/fmtlib/fmt/pull/1433>`_).
1271 <https://github.com/fmtlib/fmt/blob/5a4b24613ba16cc689977c3b5bd8274a3ba1dd1f/LICENSE.rst>`_
1280 #include <fmt/core.h>
1284 fmt::print("value = {}", 4.2);
1294 fmt::print("value = {:n}", 4.2);
1305 #include <fmt/format.h>
1307 auto s = fmt::format("{}", 4.2); // formats 4.2 using Grisu
1309 With Grisu enabled, {fmt} is 13x faster than ``std::ostringstream`` (libc++)
1312 <https://fmt.dev/unknown_mac64_clang10.0.html>`_):
1322 (`#1199 <https://github.com/fmtlib/fmt/pull/1199>`_).
1326 (`#952 <https://github.com/fmtlib/fmt/issues/952>`_):
1331 #include <fmt/ostream.h>
1340 struct fmt::formatter<S> : fmt::formatter<int> {
1348 fmt::print("{}\n", S()); // prints 2 using formatter
1351 * Introduced the experimental ``fmt::compile`` function that does format string
1352 compilation (`#618 <https://github.com/fmtlib/fmt/issues/618>`_,
1353 `#1169 <https://github.com/fmtlib/fmt/issues/1169>`_,
1354 `#1171 <https://github.com/fmtlib/fmt/pull/1171>`_):
1358 #include <fmt/compile.h>
1360 auto f = fmt::compile<int>("{}");
1361 std::string s = fmt::format(f, 42); // can be called multiple times to
1370 as percentages (`#1060 <https://github.com/fmtlib/fmt/pull/1060>`_,
1371 `#1069 <https://github.com/fmtlib/fmt/pull/1069>`_,
1372 `#1071 <https://github.com/fmtlib/fmt/pull/1071>`_):
1376 auto s = fmt::format("{:.1%}", 0.42); // s == "42.0%"
1381 (`#1004 <https://github.com/fmtlib/fmt/issues/1004>`_,
1382 `#1012 <https://github.com/fmtlib/fmt/pull/1012>`_):
1386 auto s = fmt::format("{:.1}", std::chrono::duration<double>(1.234));
1392 and the unit respectively (`#1019 <https://github.com/fmtlib/fmt/pull/1019>`_):
1396 auto value = fmt::format("{:%Q}", 42s); // value == "42"
1397 auto unit = fmt::format("{:%q}", 42s); // unit == "s"
1405 auto s = fmt::format("{0:{1}%H:%M:%S}", std::chrono::seconds(12345), 12);
1411 * Removed deprecated ``fmt/time.h``. Use ``fmt/chrono.h`` instead.
1413 * Added ``fmt::format`` and ``fmt::vformat`` overloads that take ``text_style``
1414 (`#993 <https://github.com/fmtlib/fmt/issues/993>`_,
1415 `#994 <https://github.com/fmtlib/fmt/pull/994>`_):
1419 #include <fmt/color.h>
1421 std::string message = fmt::format(fmt::emphasis::bold | fg(fmt::color::red),
1430 ``fmt::ptr`` (`#1121 <https://github.com/fmtlib/fmt/pull/1121>`_):
1435 fmt::print("{}", fmt::ptr(p)); // prints p as a pointer
1440 (`#1098 <https://github.com/fmtlib/fmt/issues/1098>`_,
1441 `#1099 <https://github.com/fmtlib/fmt/pull/1099>`_).
1446 (`#1022 <https://github.com/fmtlib/fmt/pull/1022>`_).
1472 (`#1229 <https://github.com/fmtlib/fmt/issues/1229>`_,
1473 `#1243 <https://github.com/fmtlib/fmt/pull/1243>`_).
1477 (`#1254 <https://github.com/fmtlib/fmt/pull/1254>`_).
1482 (`#1059 <https://github.com/fmtlib/fmt/issues/1059>`_).
1485 <https://github.com/fmtlib/fmt/blob/master/support/C%2B%2B.sublime-syntax>`_
1486 (`#1037 <https://github.com/fmtlib/fmt/issues/1037>`_).
1491 (`#1231 <https://github.com/fmtlib/fmt/pull/1231>`_).
1494 * Stopped setting ``CMAKE_BUILD_TYPE`` if {fmt} is a subproject
1495 (`#1081 <https://github.com/fmtlib/fmt/issues/1081>`_).
1498 (`#1039 <https://github.com/fmtlib/fmt/pull/1039>`_,
1499 `#1078 <https://github.com/fmtlib/fmt/pull/1078>`_,
1500 `#1091 <https://github.com/fmtlib/fmt/pull/1091>`_,
1501 `#1103 <https://github.com/fmtlib/fmt/pull/1103>`_,
1502 `#1177 <https://github.com/fmtlib/fmt/pull/1177>`_).
1510 (`#1049 <https://github.com/fmtlib/fmt/issues/1049>`_,
1511 `#1051 <https://github.com/fmtlib/fmt/pull/1051>`_,
1512 `#1083 <https://github.com/fmtlib/fmt/pull/1083>`_,
1513 `#1113 <https://github.com/fmtlib/fmt/pull/1113>`_,
1514 `#1114 <https://github.com/fmtlib/fmt/pull/1114>`_,
1515 `#1146 <https://github.com/fmtlib/fmt/issues/1146>`_,
1516 `#1180 <https://github.com/fmtlib/fmt/issues/1180>`_,
1517 `#1250 <https://github.com/fmtlib/fmt/pull/1250>`_,
1518 `#1252 <https://github.com/fmtlib/fmt/pull/1252>`_,
1519 `#1265 <https://github.com/fmtlib/fmt/pull/1265>`_).
1527 * Fixed ambiguous formatter specialization in ``fmt/ranges.h``
1528 (`#1123 <https://github.com/fmtlib/fmt/issues/1123>`_).
1532 (`#1268 <https://github.com/fmtlib/fmt/issues/1268>`_).
1535 (`#1056 <https://github.com/fmtlib/fmt/issues/1056>`_,
1536 `#1058 <https://github.com/fmtlib/fmt/pull/1058>`_).
1540 ranges (`#1064 <https://github.com/fmtlib/fmt/issues/1064>`_).
1543 (`#1188 <https://github.com/fmtlib/fmt/issues/1188>`_).
1546 (`#1062 <https://github.com/fmtlib/fmt/issues/1062>`_).
1549 (`#1134 <https://github.com/fmtlib/fmt/pull/1134>`_,
1550 `#1147 <https://github.com/fmtlib/fmt/pull/1147>`_).
1554 (`#1148 <https://github.com/fmtlib/fmt/issues/1148>`_).
1557 (`#1173 <https://github.com/fmtlib/fmt/issues/1173>`_).
1560 (`#1072 <https://github.com/fmtlib/fmt/issues/1072>`_,
1561 `#1129 <https://github.com/fmtlib/fmt/issues/1129>`_,
1562 `#1153 <https://github.com/fmtlib/fmt/issues/1153>`_,
1563 `#1155 <https://github.com/fmtlib/fmt/pull/1155>`_,
1564 `#1210 <https://github.com/fmtlib/fmt/issues/1210>`_,
1565 `#1222 <https://github.com/fmtlib/fmt/issues/1222>`_).
1569 (`#1124 <https://github.com/fmtlib/fmt/issues/1124>`_,
1570 `#1127 <https://github.com/fmtlib/fmt/issues/1127>`_,
1571 `#1132 <https://github.com/fmtlib/fmt/issues/1132>`_,
1572 `#1135 <https://github.com/fmtlib/fmt/pull/1135>`_,
1573 `#1136 <https://github.com/fmtlib/fmt/issues/1136>`_,
1574 `#1141 <https://github.com/fmtlib/fmt/issues/1141>`_,
1575 `#1142 <https://github.com/fmtlib/fmt/issues/1142>`_,
1576 `#1178 <https://github.com/fmtlib/fmt/issues/1178>`_,
1577 `#1179 <https://github.com/fmtlib/fmt/issues/1179>`_,
1578 `#1194 <https://github.com/fmtlib/fmt/issues/1194>`_).
1582 (`#1043 <https://github.com/fmtlib/fmt/issues/1043>`_).
1586 (`#998 <https://github.com/fmtlib/fmt/pull/998>`_,
1587 `#1006 <https://github.com/fmtlib/fmt/pull/1006>`_,
1588 `#1008 <https://github.com/fmtlib/fmt/issues/1008>`_,
1589 `#1011 <https://github.com/fmtlib/fmt/issues/1011>`_,
1590 `#1025 <https://github.com/fmtlib/fmt/issues/1025>`_,
1591 `#1027 <https://github.com/fmtlib/fmt/pull/1027>`_,
1592 `#1028 <https://github.com/fmtlib/fmt/pull/1028>`_,
1593 `#1029 <https://github.com/fmtlib/fmt/pull/1029>`_,
1594 `#1030 <https://github.com/fmtlib/fmt/pull/1030>`_,
1595 `#1031 <https://github.com/fmtlib/fmt/pull/1031>`_,
1596 `#1054 <https://github.com/fmtlib/fmt/pull/1054>`_,
1597 `#1063 <https://github.com/fmtlib/fmt/issues/1063>`_,
1598 `#1068 <https://github.com/fmtlib/fmt/pull/1068>`_,
1599 `#1074 <https://github.com/fmtlib/fmt/pull/1074>`_,
1600 `#1075 <https://github.com/fmtlib/fmt/pull/1075>`_,
1601 `#1079 <https://github.com/fmtlib/fmt/pull/1079>`_,
1602 `#1086 <https://github.com/fmtlib/fmt/pull/1086>`_,
1603 `#1088 <https://github.com/fmtlib/fmt/issues/1088>`_,
1604 `#1089 <https://github.com/fmtlib/fmt/pull/1089>`_,
1605 `#1094 <https://github.com/fmtlib/fmt/pull/1094>`_,
1606 `#1101 <https://github.com/fmtlib/fmt/issues/1101>`_,
1607 `#1102 <https://github.com/fmtlib/fmt/pull/1102>`_,
1608 `#1105 <https://github.com/fmtlib/fmt/issues/1105>`_,
1609 `#1107 <https://github.com/fmtlib/fmt/pull/1107>`_,
1610 `#1115 <https://github.com/fmtlib/fmt/issues/1115>`_,
1611 `#1117 <https://github.com/fmtlib/fmt/issues/1117>`_,
1612 `#1118 <https://github.com/fmtlib/fmt/issues/1118>`_,
1613 `#1120 <https://github.com/fmtlib/fmt/issues/1120>`_,
1614 `#1123 <https://github.com/fmtlib/fmt/issues/1123>`_,
1615 `#1139 <https://github.com/fmtlib/fmt/pull/1139>`_,
1616 `#1140 <https://github.com/fmtlib/fmt/issues/1140>`_,
1617 `#1143 <https://github.com/fmtlib/fmt/issues/1143>`_,
1618 `#1144 <https://github.com/fmtlib/fmt/pull/1144>`_,
1619 `#1150 <https://github.com/fmtlib/fmt/pull/1150>`_,
1620 `#1151 <https://github.com/fmtlib/fmt/pull/1151>`_,
1621 `#1152 <https://github.com/fmtlib/fmt/issues/1152>`_,
1622 `#1154 <https://github.com/fmtlib/fmt/issues/1154>`_,
1623 `#1156 <https://github.com/fmtlib/fmt/issues/1156>`_,
1624 `#1159 <https://github.com/fmtlib/fmt/pull/1159>`_,
1625 `#1175 <https://github.com/fmtlib/fmt/issues/1175>`_,
1626 `#1181 <https://github.com/fmtlib/fmt/issues/1181>`_,
1627 `#1186 <https://github.com/fmtlib/fmt/issues/1186>`_,
1628 `#1187 <https://github.com/fmtlib/fmt/pull/1187>`_,
1629 `#1191 <https://github.com/fmtlib/fmt/pull/1191>`_,
1630 `#1197 <https://github.com/fmtlib/fmt/issues/1197>`_,
1631 `#1200 <https://github.com/fmtlib/fmt/issues/1200>`_,
1632 `#1203 <https://github.com/fmtlib/fmt/issues/1203>`_,
1633 `#1205 <https://github.com/fmtlib/fmt/issues/1205>`_,
1634 `#1206 <https://github.com/fmtlib/fmt/pull/1206>`_,
1635 `#1213 <https://github.com/fmtlib/fmt/issues/1213>`_,
1636 `#1214 <https://github.com/fmtlib/fmt/issues/1214>`_,
1637 `#1217 <https://github.com/fmtlib/fmt/pull/1217>`_,
1638 `#1228 <https://github.com/fmtlib/fmt/issues/1228>`_,
1639 `#1230 <https://github.com/fmtlib/fmt/pull/1230>`_,
1640 `#1232 <https://github.com/fmtlib/fmt/issues/1232>`_,
1641 `#1235 <https://github.com/fmtlib/fmt/pull/1235>`_,
1642 `#1236 <https://github.com/fmtlib/fmt/pull/1236>`_,
1643 `#1240 <https://github.com/fmtlib/fmt/issues/1240>`_).
1671 #include <fmt/chrono.h>
1675 fmt::print("Default format: {} {}\n", 42s, 100ms);
1676 fmt::print("strftime-like format: {:%H:%M:%S}\n", 3h + 15min + 30s);
1687 (`#961 <https://github.com/fmtlib/fmt/pull/961>`_,
1688 `#967 <https://github.com/fmtlib/fmt/pull/967>`_,
1689 `#973 <https://github.com/fmtlib/fmt/pull/973>`_):
1693 #include <fmt/color.h>
1696 print(fg(fmt::color::crimson) | fmt::emphasis::bold,
1698 print(fg(fmt::color::floral_white) | bg(fmt::color::slate_gray) |
1699 fmt::emphasis::underline, "Hello, {}!\n", "мир");
1700 print(fg(fmt::color::steel_blue) | fmt::emphasis::italic,
1712 (`#968 <https://github.com/fmtlib/fmt/issues/968>`_,
1713 `#974 <https://github.com/fmtlib/fmt/pull/974>`_)
1717 #include <fmt/color.h>
1720 print(fg(fmt::terminal_color::red), "stop\n");
1731 (`#880 <https://github.com/fmtlib/fmt/issues/880>`_,
1732 `#881 <https://github.com/fmtlib/fmt/pull/881>`_,
1733 `#883 <https://github.com/fmtlib/fmt/pull/883>`_,
1734 `#885 <https://github.com/fmtlib/fmt/pull/885>`_,
1735 `#897 <https://github.com/fmtlib/fmt/pull/897>`_,
1736 `#920 <https://github.com/fmtlib/fmt/issues/920>`_).
1738 returning ``fmt::string_view`` can be used as a format string:
1748 std::string message = fmt::format(my_string("The answer is {}."), 42);
1753 (`#898 <https://github.com/fmtlib/fmt/pull/898>`_):
1757 auto message = fmt::format(std::string_view("The answer is {}."), 42);
1762 (`#924 <https://github.com/fmtlib/fmt/pull/924>`_):
1766 print(fmt(L"{:f}"), 42); // compile-time error: invalid type specifier
1771 (`#867 <https://github.com/fmtlib/fmt/pull/867>`_):
1775 #include <fmt/color.h>
1778 print(fg(fmt::color::red), L"{}\n", 42);
1784 (`#628 <https://github.com/fmtlib/fmt/issues/628>`_,
1785 `#891 <https://github.com/fmtlib/fmt/pull/891>`_):
1789 using namespace fmt::literals;
1790 auto s = fmt::format("{:*^5}"_u, ""_u); // s == "****"_u
1796 #include <fmt/locale.h>
1804 auto s = fmt::format(std::locale(loc, new numpunct()), "{:n}", 1234567);
1808 (`#921 <https://github.com/fmtlib/fmt/pull/921>`_).
1812 (`#934 <https://github.com/fmtlib/fmt/pull/934>`_).
1815 * Deprecated ``fmt::visit``, ``parse_context``, and ``wparse_context``.
1816 Use ``fmt::visit_format_arg``, ``format_parse_context``, and
1821 (`#873 <https://github.com/fmtlib/fmt/issues/873>`_,
1822 `#902 <https://github.com/fmtlib/fmt/pull/902>`_).
1829 fmt::print("{000}", 42); // error
1834 (`#878 <https://github.com/fmtlib/fmt/issues/878>`_).
1837 (`#164 <https://github.com/fmtlib/fmt/issues/164>`_,
1838 `#877 <https://github.com/fmtlib/fmt/issues/877>`_,
1839 `#901 <https://github.com/fmtlib/fmt/pull/901>`_,
1840 `#906 <https://github.com/fmtlib/fmt/pull/906>`_,
1841 `#979 <https://github.com/fmtlib/fmt/pull/979>`_).
1848 (`#916 <https://github.com/fmtlib/fmt/pull/916>`_).
1852 (`#909 <https://github.com/fmtlib/fmt/pull/909>`_,
1853 `#926 <https://github.com/fmtlib/fmt/pull/926>`_,
1854 `#937 <https://github.com/fmtlib/fmt/pull/937>`_,
1855 `#953 <https://github.com/fmtlib/fmt/pull/953>`_,
1856 `#959 <https://github.com/fmtlib/fmt/pull/959>`_).
1864 (`#914 <https://github.com/fmtlib/fmt/pull/914>`_).
1868 (`#895 <https://github.com/fmtlib/fmt/pull/895>`_).
1872 (`#913 <https://github.com/fmtlib/fmt/pull/913>`_).
1876 (`#905 <https://github.com/fmtlib/fmt/issues/905>`_).
1879 (`#882 <https://github.com/fmtlib/fmt/pull/882>`_,
1880 `#886 <https://github.com/fmtlib/fmt/pull/886>`_,
1881 `#933 <https://github.com/fmtlib/fmt/pull/933>`_,
1882 `#941 <https://github.com/fmtlib/fmt/pull/941>`_,
1883 `#931 <https://github.com/fmtlib/fmt/issues/931>`_,
1884 `#943 <https://github.com/fmtlib/fmt/pull/943>`_,
1885 `#954 <https://github.com/fmtlib/fmt/pull/954>`_,
1886 `#956 <https://github.com/fmtlib/fmt/pull/956>`_,
1887 `#962 <https://github.com/fmtlib/fmt/pull/962>`_,
1888 `#965 <https://github.com/fmtlib/fmt/issues/965>`_,
1889 `#977 <https://github.com/fmtlib/fmt/issues/977>`_,
1890 `#983 <https://github.com/fmtlib/fmt/pull/983>`_,
1891 `#989 <https://github.com/fmtlib/fmt/pull/989>`_).
1904 (`#870 <https://github.com/fmtlib/fmt/pull/870>`_).
1909 * Prevented ``fmt/range.h`` from specializing ``fmt::basic_string_view``
1910 (`#865 <https://github.com/fmtlib/fmt/issues/865>`_,
1911 `#868 <https://github.com/fmtlib/fmt/pull/868>`_).
1915 (`#872 <https://github.com/fmtlib/fmt/pull/872>`_).
1919 (`#875 <https://github.com/fmtlib/fmt/pull/875>`_).
1923 (`#874 <https://github.com/fmtlib/fmt/issues/874>`_).
1936 fmt::format 5.1 0.58
1937 fmt::format 5.2 0.35 1.66x
1938 fmt::format_to 5.1 0.51
1939 fmt::format_to 5.2 0.23 2.22x
1945 * Changed the ``fmt`` macro from opt-out to opt-in to prevent name collisions.
1947 ``fmt/format.h``:
1952 #include <fmt/format.h>
1953 std::string answer = format(fmt("{}"), 42);
1956 ``fmt::memory_buffer`` (`#783 <https://github.com/fmtlib/fmt/issues/783>`_):
1960 fmt::memory_buffer buf;
1962 fmt::format_to(buf, fmt("{:d}"), "foo");
1964 * Moved experimental color support to ``fmt/color.h`` and enabled the
1969 ``fmt::string_view``:
1974 explicit operator fmt::string_view() const { return "foo"; }
1986 (`#814 <https://github.com/fmtlib/fmt/issues/814>`_,
1987 `#819 <https://github.com/fmtlib/fmt/pull/819>`_).
1993 (`#839 <https://github.com/fmtlib/fmt/pull/839>`_).
1997 (`#801 <https://github.com/fmtlib/fmt/issues/801>`_,
1998 `#810 <https://github.com/fmtlib/fmt/pull/810>`_).
2003 (`#806 <https://github.com/fmtlib/fmt/pull/806>`_).
2007 (`#808 <https://github.com/fmtlib/fmt/issues/808>`_).
2010 (`#807 <https://github.com/fmtlib/fmt/issues/807>`_):
2015 static const std::string answer = fmt::format("{}", 42);
2018 (`#804 <https://github.com/fmtlib/fmt/pull/804>`_,
2019 `#809 <https://github.com/fmtlib/fmt/issues/809>`_,
2020 `#811 <https://github.com/fmtlib/fmt/pull/811>`_,
2021 `#822 <https://github.com/fmtlib/fmt/issues/822>`_,
2022 `#827 <https://github.com/fmtlib/fmt/pull/827>`_,
2023 `#830 <https://github.com/fmtlib/fmt/issues/830>`_,
2024 `#838 <https://github.com/fmtlib/fmt/pull/838>`_,
2025 `#843 <https://github.com/fmtlib/fmt/issues/843>`_,
2026 `#844 <https://github.com/fmtlib/fmt/pull/844>`_,
2027 `#851 <https://github.com/fmtlib/fmt/issues/851>`_,
2028 `#852 <https://github.com/fmtlib/fmt/pull/852>`_,
2029 `#854 <https://github.com/fmtlib/fmt/pull/854>`_).
2043 #define FMT_HEADER_ONLY // or compile fmt with FMT_EXTENDED_COLORS defined
2044 #include <fmt/format.h>
2046 fmt::print(fmt::color::steel_blue, "Some beautiful text");
2050 (`#762 <https://github.com/fmtlib/fmt/issues/762>`_
2051 `#767 <https://github.com/fmtlib/fmt/pull/767>`_).
2055 (`#766 <https://github.com/fmtlib/fmt/pull/766>`_).
2059 (`#776 <https://github.com/fmtlib/fmt/issues/776>`_).
2062 (`#764 <https://github.com/fmtlib/fmt/issues/764>`_,
2063 `#769 <https://github.com/fmtlib/fmt/issues/769>`_).
2067 (`#751 <https://github.com/fmtlib/fmt/issues/751>`_,
2068 `#759 <https://github.com/fmtlib/fmt/pull/759>`_).
2073 (`#736 <https://github.com/fmtlib/fmt/pull/736>`_).
2079 (`#793 <https://github.com/fmtlib/fmt/issues/793>`_).
2082 (`#795 <https://github.com/fmtlib/fmt/issues/795>`_).
2085 (`#750 <https://github.com/fmtlib/fmt/issues/750>`_).
2089 (`#756 <https://github.com/fmtlib/fmt/issues/756>`_).
2092 (`#778 <https://github.com/fmtlib/fmt/issues/778>`_).
2095 (`#754 <https://github.com/fmtlib/fmt/issues/754>`_).
2097 * Fixed handling of compile-time strings when including ``fmt/ostream.h``.
2098 (`#768 <https://github.com/fmtlib/fmt/issues/768>`_).
2101 (`#742 <https://github.com/fmtlib/fmt/issues/742>`_,
2102 `#748 <https://github.com/fmtlib/fmt/issues/748>`_,
2103 `#752 <https://github.com/fmtlib/fmt/issues/752>`_,
2104 `#770 <https://github.com/fmtlib/fmt/issues/770>`_,
2105 `#775 <https://github.com/fmtlib/fmt/pull/775>`_,
2106 `#779 <https://github.com/fmtlib/fmt/issues/779>`_,
2107 `#780 <https://github.com/fmtlib/fmt/pull/780>`_,
2108 `#790 <https://github.com/fmtlib/fmt/pull/790>`_,
2109 `#792 <https://github.com/fmtlib/fmt/pull/792>`_,
2110 `#800 <https://github.com/fmtlib/fmt/pull/800>`_).
2123 For older compilers use {fmt} `version 4.x
2124 <https://github.com/fmtlib/fmt/releases/tag/4.1.0>`_ which continues to be
2133 <https://fmt.dev/latest/api.html#compile-time-format-string-checks>`_. For
2138 #include <fmt/format.h>
2140 std::string s = format(fmt("{:d}"), "foo");
2146 …<source>:4:19: note: in instantiation of function template specialization 'fmt::v5::format<S, char…
2147 std::string s = format(fmt("{:d}"), "foo");
2162 namespace fmt {
2184 std::string s = format(fmt("{:x}"), Answer());
2194 <https://fmt.dev/latest/api.html#output-iterator-support>`_:
2199 #include <fmt/format.h>
2202 fmt::format_to(std::back_inserter(out), "{}", 42);
2205 …<https://fmt.dev/latest/api.html#_CPPv2N3fmt11format_to_nE8OutputItNSt6size_tE11string_viewDpRK4Ar…
2207 (`#298 <https://github.com/fmtlib/fmt/issues/298>`_):
2212 fmt::format_to_n(out, sizeof(out), "{}", 12345);
2216 <https://fmt.dev/latest/api.html#_CPPv2N3fmt14formatted_sizeE11string_viewDpRK4Args>`_
2221 #include <fmt/format.h>
2223 auto size = fmt::formatted_size("{}", 12345); // size == 5
2226 providing a lightweight `core API <https://fmt.dev/latest/api.html#core-api>`_:
2230 #include <fmt/core.h>
2232 fmt::print("The answer is {}.", 42);
2235 <https://github.com/fmtlib/fmt#compile-time-and-code-bloat>`_.
2238 <https://fmt.dev/latest/api.html#_CPPv2N3fmt16make_format_argsEDpRK4Args>`_
2244 void vreport_error(const char *format, fmt::format_args args) {
2245 fmt::print("Error: ");
2246 fmt::vprint(format, args);
2250 vreport_error(format, fmt::make_format_args(args...));
2254 (`#687 <https://github.com/fmtlib/fmt/issues/687>`_,
2255 `#694 <https://github.com/fmtlib/fmt/pull/694>`_).
2269 types in ``fmt/ranges.h`` (`#735 <https://github.com/fmtlib/fmt/pull/735>`_):
2273 #include <fmt/ranges.h>
2276 fmt::print("{}", v); // prints {1, 2, 3}
2281 (`#712 <https://github.com/fmtlib/fmt/pull/712>`_):
2285 #include <fmt/time.h>
2288 auto s = fmt::format(L"The date is {:%Y-%m-%d}.", *std::localtime(&t));
2293 (`#724 <https://github.com/fmtlib/fmt/pull/724>`_).
2297 in the format API and provided ``fmt::string_view`` which implements a subset
2301 (`#607 <https://github.com/fmtlib/fmt/pull/607>`_):
2305 #include <fmt/core.h>
2308 fmt::print("{}", std::experimental::string_view("foo"));
2317 fmt::format("{} {two}", 1, fmt::arg("two", 2));
2320 <https://fmt.dev/latest/api.html#format-api>`_ with compile-time handling of
2324 (`#606 <https://github.com/fmtlib/fmt/pull/606>`_).
2327 (`#515 <https://github.com/fmtlib/fmt/pull/515>`_,
2328 `#614 <https://github.com/fmtlib/fmt/issues/614>`_,
2329 `#617 <https://github.com/fmtlib/fmt/pull/617>`_,
2330 `#661 <https://github.com/fmtlib/fmt/pull/661>`_,
2331 `#680 <https://github.com/fmtlib/fmt/pull/680>`_).
2340 * Added debug postfix ``d`` to the ``fmt`` library name
2341 (`#636 <https://github.com/fmtlib/fmt/issues/636>`_).
2343 * Removed unnecessary ``fmt/`` prefix in includes
2344 (`#397 <https://github.com/fmtlib/fmt/pull/397>`_).
2347 * Moved ``fmt/*.h`` to ``include/fmt/*.h`` to prevent irrelevant files and
2348 directories appearing on the include search paths when fmt is used as a
2351 * Added qmake project file ``support/fmt.pro``
2352 (`#641 <https://github.com/fmtlib/fmt/pull/641>`_).
2356 (`#649 <https://github.com/fmtlib/fmt/pull/649>`_).
2362 (`#616 <https://github.com/fmtlib/fmt/pull/616>`_).
2365 * Fixed handling of nested braces in ``fmt::join``
2366 (`#638 <https://github.com/fmtlib/fmt/issues/638>`_).
2369 (`#497 <https://github.com/fmtlib/fmt/pull/497>`_).
2373 (`#626 <https://github.com/fmtlib/fmt/pull/626>`_).
2377 (`#640 <https://github.com/fmtlib/fmt/pull/640>`_,
2378 `#656 <https://github.com/fmtlib/fmt/pull/656>`_,
2379 `#679 <https://github.com/fmtlib/fmt/pull/679>`_,
2380 `#681 <https://github.com/fmtlib/fmt/pull/681>`_,
2381 `#705 <https://github.com/fmtlib/fmt/pull/705>`__,
2382 `#715 <https://github.com/fmtlib/fmt/issues/715>`_,
2383 `#717 <https://github.com/fmtlib/fmt/pull/717>`_,
2384 `#720 <https://github.com/fmtlib/fmt/pull/720>`_,
2385 `#723 <https://github.com/fmtlib/fmt/pull/723>`_,
2386 `#726 <https://github.com/fmtlib/fmt/pull/726>`_,
2387 `#730 <https://github.com/fmtlib/fmt/pull/730>`_,
2388 `#739 <https://github.com/fmtlib/fmt/pull/739>`_).
2398 (`#653 <https://github.com/fmtlib/fmt/pull/653>`_).
2402 (`#682 <https://github.com/fmtlib/fmt/issues/682>`_).
2405 (`#655 <https://github.com/fmtlib/fmt/pull/655>`_).
2409 (`#648 <https://github.com/fmtlib/fmt/issues/648>`_).
2412 C libraries (`#644 <https://github.com/fmtlib/fmt/issues/644>`_).
2415 (`#650 <https://github.com/fmtlib/fmt/issues/650>`_).
2418 (`#660 <https://github.com/fmtlib/fmt/pull/660>`_).
2422 (`#732 <https://github.com/fmtlib/fmt/pull/732>`_).
2427 (`#664 <https://github.com/fmtlib/fmt/issues/664>`_).
2430 (`#734 <https://github.com/fmtlib/fmt/issues/734>`_).
2433 (`#668 <https://github.com/fmtlib/fmt/issues/668>`_).
2436 (`#675 <https://github.com/fmtlib/fmt/issues/675>`_).
2439 (`#676 <https://github.com/fmtlib/fmt/pull/676>`_).
2443 (`#689 <https://github.com/fmtlib/fmt/issues/689>`_).
2446 (`#686 <https://github.com/fmtlib/fmt/issues/686>`_).
2448 * Fixed DLL issues (`#696 <https://github.com/fmtlib/fmt/pull/696>`_).
2452 (`#690 <https://github.com/fmtlib/fmt/issues/690>`_).
2455 (`#729 <https://github.com/fmtlib/fmt/issues/729>`_).
2457 * Fixed handling of reused format specs (as in ``fmt::join``) for pointers
2458 (`#725 <https://github.com/fmtlib/fmt/pull/725>`_).
2461 * Fixed installation of ``fmt/ranges.h``
2462 (`#738 <https://github.com/fmtlib/fmt/pull/738>`_).
2468 * Added ``fmt::to_wstring()`` in addition to ``fmt::to_string()``
2469 (`#559 <https://github.com/fmtlib/fmt/pull/559>`_).
2473 (`#571 <https://github.com/fmtlib/fmt/pull/571>`_ and
2474 `#578 <https://github.com/fmtlib/fmt/pull/578>`_).
2479 (`#581 <https://github.com/fmtlib/fmt/issues/581>`_).
2482 * Allowed formatting of class hierarchies with ``fmt::format_arg()``
2483 (`#547 <https://github.com/fmtlib/fmt/pull/547>`_).
2487 (`#563 <https://github.com/fmtlib/fmt/pull/563>`_).
2491 (`#583 <https://github.com/fmtlib/fmt/pull/583>`_).
2495 ``FMT_VARIADIC_CONST`` (`#591 <https://github.com/fmtlib/fmt/pull/591>`_).
2500 (`#551 <https://github.com/fmtlib/fmt/issues/551>`_), ill-formed macros
2501 (`#542 <https://github.com/fmtlib/fmt/pull/542>`_) and ambiguous overloads
2502 (`#580 <https://github.com/fmtlib/fmt/issues/580>`_).
2505 * Prevented warnings on MSVC (`#605 <https://github.com/fmtlib/fmt/pull/605>`_,
2506 `#602 <https://github.com/fmtlib/fmt/pull/602>`_, and
2507 `#545 <https://github.com/fmtlib/fmt/pull/545>`_),
2508 clang (`#582 <https://github.com/fmtlib/fmt/pull/582>`_),
2509 GCC (`#573 <https://github.com/fmtlib/fmt/issues/573>`_),
2510 various conversion warnings (`#609 <https://github.com/fmtlib/fmt/pull/609>`_,
2511 `#567 <https://github.com/fmtlib/fmt/pull/567>`_,
2512 `#553 <https://github.com/fmtlib/fmt/pull/553>`_ and
2513 `#553 <https://github.com/fmtlib/fmt/pull/553>`_), and added ``override`` and
2514 ``[[noreturn]]`` (`#549 <https://github.com/fmtlib/fmt/pull/549>`_ and
2515 `#555 <https://github.com/fmtlib/fmt/issues/555>`_).
2527 (`#610 <https://github.com/fmtlib/fmt/pull/610>`_) and fixed warnings
2528 (`#536 <https://github.com/fmtlib/fmt/pull/536>`_ and
2529 `#556 <https://github.com/fmtlib/fmt/pull/556>`_).
2538 (`#527 <https://github.com/fmtlib/fmt/pull/527>`_).
2541 * Added ``string.h`` containing ``fmt::to_string()`` as alternative to
2543 (`#326 <https://github.com/fmtlib/fmt/issues/326>`_ and
2544 `#441 <https://github.com/fmtlib/fmt/pull/441>`_):
2548 #include "fmt/string.h"
2550 std::string answer = fmt::to_string(42);
2555 * Moved ``fmt::printf()`` to new ``printf.h`` header and allowed ``%s`` as
2556 generic specifier (`#453 <https://github.com/fmtlib/fmt/pull/453>`_),
2558 (`#490 <https://github.com/fmtlib/fmt/pull/490>`_), added custom writer
2559 support (`#476 <https://github.com/fmtlib/fmt/issues/476>`_) and implemented
2561 (`#339 <https://github.com/fmtlib/fmt/pull/339>`_ and
2562 `#340 <https://github.com/fmtlib/fmt/pull/340>`_):
2566 #include "fmt/printf.h"
2569 fmt::printf("%s", 42);
2574 See also `#360 <https://github.com/fmtlib/fmt/issues/360>`_,
2575 `#335 <https://github.com/fmtlib/fmt/issues/335>`_ and
2576 `#331 <https://github.com/fmtlib/fmt/issues/331>`_.
2580 (`#450 <https://github.com/fmtlib/fmt/pull/450>`_).
2583 * Added ``fmt::join()`` function that takes a range and formats
2585 (`#466 <https://github.com/fmtlib/fmt/pull/466>`_):
2589 #include "fmt/format.h"
2593 fmt::print("({:+06.2f})", fmt::join(v.begin(), v.end(), ", "));
2598 of built-in formatting (`#444 <https://github.com/fmtlib/fmt/pull/444>`_).
2600 See also `#439 <https://github.com/fmtlib/fmt/issues/439>`_.
2602 * Added ``fmt::format_system_error()`` for error code formatting
2603 (`#323 <https://github.com/fmtlib/fmt/issues/323>`_ and
2604 `#526 <https://github.com/fmtlib/fmt/pull/526>`_).
2607 * Added thread-safe ``fmt::localtime()`` and ``fmt::gmtime()``
2609 (`#396 <https://github.com/fmtlib/fmt/pull/396>`_).
2613 (`#389 <https://github.com/fmtlib/fmt/pull/389>`_ and
2614 `#390 <https://github.com/fmtlib/fmt/pull/390>`_).
2618 (`#493 <https://github.com/fmtlib/fmt/pull/493>`_).
2620 `#480 <https://github.com/fmtlib/fmt/issues/480>`_ and
2621 `#491 <https://github.com/fmtlib/fmt/issues/491>`_.
2623 * Fixed handling of wide strings in ``fmt::StringWriter``.
2626 (`#357 <https://github.com/fmtlib/fmt/issues/357>`_).
2629 (`#494 <https://github.com/fmtlib/fmt/pull/494>`_,
2630 `#499 <https://github.com/fmtlib/fmt/pull/499>`_,
2631 `#483 <https://github.com/fmtlib/fmt/pull/483>`_,
2632 `#485 <https://github.com/fmtlib/fmt/pull/485>`_,
2633 `#482 <https://github.com/fmtlib/fmt/pull/482>`_,
2634 `#475 <https://github.com/fmtlib/fmt/pull/475>`_,
2635 `#473 <https://github.com/fmtlib/fmt/pull/473>`_ and
2636 `#414 <https://github.com/fmtlib/fmt/pull/414>`_).
2644 (`#511 <https://github.com/fmtlib/fmt/pull/511>`_ and
2645 `#513 <https://github.com/fmtlib/fmt/pull/513>`_), supported header-only
2646 ``printf.h`` (`#354 <https://github.com/fmtlib/fmt/pull/354>`_), fixed issue
2648 (`#418 <https://github.com/fmtlib/fmt/issues/418>`_,
2649 `#419 <https://github.com/fmtlib/fmt/pull/419>`_ and
2650 `#420 <https://github.com/fmtlib/fmt/pull/420>`_).
2658 `#393 <https://github.com/fmtlib/fmt/pull/393>`_.
2664 (`#411 <https://github.com/fmtlib/fmt/issues/411>`_).
2667 (`#409 <https://github.com/fmtlib/fmt/pull/409>`_).
2671 (`#413 <https://github.com/fmtlib/fmt/issues/413>`_).
2674 (`#507 <https://github.com/fmtlib/fmt/issues/507>`_).
2676 * Fixed signbit detection (`#423 <https://github.com/fmtlib/fmt/issues/423>`_).
2678 * Fixed naming collision (`#425 <https://github.com/fmtlib/fmt/issues/425>`_).
2681 (`#457 <https://github.com/fmtlib/fmt/pull/457>`_).
2684 * Fixed Android detection (`#458 <https://github.com/fmtlib/fmt/pull/458>`_).
2688 (`#503 <https://github.com/fmtlib/fmt/pull/503>`_).
2692 (`#445 <https://github.com/fmtlib/fmt/pull/455>`_).
2696 (`#505 <https://github.com/fmtlib/fmt/issues/505>`_).
2698 * Fixed DLL issues (`#469 <https://github.com/fmtlib/fmt/pull/469>`_ and
2699 `#502 <https://github.com/fmtlib/fmt/pull/502>`_).
2704 (`#433 <https://github.com/fmtlib/fmt/issues/433>`_).
2706 * Fixed various warnings (`#403 <https://github.com/fmtlib/fmt/pull/403>`_,
2707 `#410 <https://github.com/fmtlib/fmt/pull/410>`_ and
2708 `#510 <https://github.com/fmtlib/fmt/pull/510>`_).
2714 (`#519 <https://github.com/fmtlib/fmt/issues/519>`_).
2717 (`#479 <https://github.com/fmtlib/fmt/issues/479>`_).
2724 (`#353 <https://github.com/fmtlib/fmt/issues/353>`_).
2727 (`#373 <https://github.com/fmtlib/fmt/issues/373>`_).
2730 (`#367 <https://github.com/fmtlib/fmt/issues/367>`_).
2733 (`#318 <https://github.com/fmtlib/fmt/issues/318>`_,
2734 `#250 <https://github.com/fmtlib/fmt/issues/250>`_, also merged
2735 `#385 <https://github.com/fmtlib/fmt/pull/385>`_ and
2736 `#361 <https://github.com/fmtlib/fmt/pull/361>`_).
2741 (`#327 <https://github.com/fmtlib/fmt/pull/327>`_,
2742 `#345 <https://github.com/fmtlib/fmt/issues/345>`_ and
2743 `#381 <https://github.com/fmtlib/fmt/pull/381>`_),
2744 FreeBSD (`#358 <https://github.com/fmtlib/fmt/pull/358>`_),
2745 Cygwin (`#388 <https://github.com/fmtlib/fmt/issues/388>`_),
2746 MinGW (`#355 <https://github.com/fmtlib/fmt/issues/355>`_) as well as other
2747 issues (`#350 <https://github.com/fmtlib/fmt/issues/350>`_,
2748 `#366 <https://github.com/fmtlib/fmt/issues/355>`_,
2749 `#348 <https://github.com/fmtlib/fmt/pull/348>`_,
2750 `#402 <https://github.com/fmtlib/fmt/pull/402>`_,
2751 `#405 <https://github.com/fmtlib/fmt/pull/405>`_).
2759 (`#320 <https://github.com/fmtlib/fmt/issues/320>`_,
2760 `#333 <https://github.com/fmtlib/fmt/pull/333>`_,
2761 `#347 <https://github.com/fmtlib/fmt/issues/347>`_,
2762 `#362 <https://github.com/fmtlib/fmt/pull/362>`_).
2769 * The project has been renamed from C++ Format (cppformat) to fmt for
2771 (`#307 <https://github.com/fmtlib/fmt/issues/307>`_).
2772 Library headers are now located in the ``fmt`` directory:
2776 #include "fmt/format.h"
2781 The documentation is now available at https://fmt.dev.
2784 `date and time formatting <https://fmt.dev/3.0.0/api.html#date-and-time-formatting>`_
2785 (`#283 <https://github.com/fmtlib/fmt/issues/283>`_):
2789 #include "fmt/time.h"
2793 fmt::print("The date is {:%Y-%m-%d}.", *std::localtime(&t));
2796 overloaded ``operator<<`` has been moved to ``fmt/ostream.h``:
2800 #include "fmt/ostream.h"
2812 std::string s = fmt::format("The date is {}", Date(2012, 12, 9));
2816 <https://fmt.dev/3.0.0/api.html#argument-formatters>`_
2817 (`#235 <https://github.com/fmtlib/fmt/issues/235>`_).
2820 (`#305 <https://github.com/fmtlib/fmt/issues/305>`_):
2825 fmt::print("cppformat: {:n}\n", 1234567); // prints 1,234,567
2828 format specifier (`#265 <https://github.com/fmtlib/fmt/issues/265>`_):
2832 fmt::printf("%lld", -42); // prints -42
2838 (`#255 <https://github.com/fmtlib/fmt/issues/255>`_):
2842 fmt::printf("%d", std::numeric_limits<long long>::max());
2847 (`#231 <https://github.com/fmtlib/fmt/issues/231>`_).
2850 (`#311 <https://github.com/fmtlib/fmt/issues/311>`_,
2851 `#312 <https://github.com/fmtlib/fmt/pull/312>`_).
2856 (`#243 <https://github.com/fmtlib/fmt/pull/243>`_,
2857 `#249 <https://github.com/fmtlib/fmt/pull/249>`_,
2858 `#317 <https://github.com/fmtlib/fmt/issues/317>`_):
2868 * Compile test fixes (`#313 <https://github.com/fmtlib/fmt/pull/313>`_).
2871 * Documentation fixes (`#239 <https://github.com/fmtlib/fmt/pull/239>`_,
2872 `#248 <https://github.com/fmtlib/fmt/issues/248>`_,
2873 `#252 <https://github.com/fmtlib/fmt/issues/252>`_,
2874 `#258 <https://github.com/fmtlib/fmt/pull/258>`_,
2875 `#260 <https://github.com/fmtlib/fmt/issues/260>`_,
2876 `#301 <https://github.com/fmtlib/fmt/issues/301>`_,
2877 `#309 <https://github.com/fmtlib/fmt/pull/309>`_).
2883 (`#244 <https://github.com/fmtlib/fmt/issues/244>`_,
2884 `#256 <https://github.com/fmtlib/fmt/pull/256>`_,
2885 `#259 <https://github.com/fmtlib/fmt/pull/259>`_,
2886 `#263 <https://github.com/fmtlib/fmt/issues/263>`_,
2887 `#274 <https://github.com/fmtlib/fmt/issues/274>`_,
2888 `#277 <https://github.com/fmtlib/fmt/pull/277>`_,
2889 `#286 <https://github.com/fmtlib/fmt/pull/286>`_,
2890 `#291 <https://github.com/fmtlib/fmt/issues/291>`_,
2891 `#296 <https://github.com/fmtlib/fmt/issues/296>`_,
2892 `#308 <https://github.com/fmtlib/fmt/issues/308>`_)
2898 (`#280 <https://github.com/fmtlib/fmt/issues/280>`_,
2899 `#285 <https://github.com/fmtlib/fmt/pull/285>`_)
2903 (`#273 <https://github.com/fmtlib/fmt/pull/273>`_).
2906 * Fixed Android build (`#271 <https://github.com/fmtlib/fmt/pull/271>`_).
2910 (`#261 <https://github.com/fmtlib/fmt/issues/261>`_,
2911 `#262 <https://github.com/fmtlib/fmt/pull/262>`_).
2915 (`#251 <https://github.com/fmtlib/fmt/pull/251>`_).
2919 (`#245 <https://github.com/fmtlib/fmt/pull/245>`_).
2922 * Fixed compilation on Cygwin (`#304 <https://github.com/fmtlib/fmt/issues/304>`_).
2925 (`#276 <https://github.com/fmtlib/fmt/issues/276>`_).
2929 (`#268 <https://github.com/fmtlib/fmt/issues/268>`_).
2939 (`#299 <https://github.com/fmtlib/fmt/pull/299>`_).
2942 * Documentation fixes (`#252 <https://github.com/fmtlib/fmt/issues/252>`_).
2948 (`#267 <https://github.com/fmtlib/fmt/pull/267>`_):
2970 (`#264 <https://github.com/fmtlib/fmt/issues/264>`_).
2974 (`#241 <https://github.com/fmtlib/fmt/issues/241>`_).
2978 (`#248 <https://github.com/fmtlib/fmt/issues/248>`_,
2979 `#260 <https://github.com/fmtlib/fmt/issues/260>`_).
2988 (`#169 <https://github.com/fmtlib/fmt/pull/169>`_,
2989 `#173 <https://github.com/fmtlib/fmt/pull/173>`_,
2990 `#174 <https://github.com/fmtlib/fmt/pull/174>`_):
2994 fmt::print("The answer is {answer}.", fmt::arg("answer", 42));
2999 (`#204 <https://github.com/fmtlib/fmt/pull/204>`_,
3000 `#206 <https://github.com/fmtlib/fmt/pull/206>`_,
3001 `#207 <https://github.com/fmtlib/fmt/pull/207>`_):
3005 using namespace fmt::literals;
3006 fmt::print("The answer is {answer}.", "answer"_a=42);
3012 (`#141 <https://github.com/fmtlib/fmt/issues/141>`_).
3016 (`#168 <https://github.com/fmtlib/fmt/pull/168>`_):
3020 fmt::format("{0:{1}}", 42, 5); // gives " 42"
3026 (`#232 <https://github.com/fmtlib/fmt/issues/232>`_).
3029 (`#170 <https://github.com/fmtlib/fmt/issues/170>`_):
3033 fmt::print("{}", true); // prints "true"
3039 fmt::print("{:d}", true); // prints "1"
3041 * ``fmt::printf`` and ``fmt::sprintf`` now support formatting of ``bool`` with the
3043 (`#223 <https://github.com/fmtlib/fmt/pull/223>`_):
3047 fmt::printf("%s", true); // prints "true"
3052 (`#217 <https://github.com/fmtlib/fmt/pull/217>`_).
3055 (`#223 <https://github.com/fmtlib/fmt/pull/223>`_):
3059 fmt::print("{:p}", "test"); // prints pointer value
3063 * [Breaking] ``fmt::printf`` and ``fmt::sprintf`` now print null pointers as ``(nil)``
3065 (`#226 <https://github.com/fmtlib/fmt/pull/226>`_).
3068 * [Breaking] ``fmt::(s)printf`` now supports formatting of objects of user-defined types
3070 (`#201 <https://github.com/fmtlib/fmt/issues/201>`_):
3074 fmt::printf("The date is %s", Date(2012, 12, 9));
3078 (`#140 <https://github.com/fmtlib/fmt/issues/140>`_).
3084 (`#100 <https://github.com/fmtlib/fmt/issues/100>`_,
3085 `#159 <https://github.com/fmtlib/fmt/issues/159>`_,
3086 `#183 <https://github.com/fmtlib/fmt/issues/183>`_):
3096 (`#185 <https://github.com/fmtlib/fmt/issues/185>`_).
3100 (`#197 <https://github.com/fmtlib/fmt/issues/197>`_,
3101 `#198 <https://github.com/fmtlib/fmt/issues/198>`_,
3102 `#200 <https://github.com/fmtlib/fmt/issues/200>`_).
3106 (`#215 <https://github.com/fmtlib/fmt/pull/215>`_).
3111 (`#171 <https://github.com/fmtlib/fmt/issues/171>`_).
3117 (`#152 <https://github.com/fmtlib/fmt/issues/152>`_,
3118 `#153 <https://github.com/fmtlib/fmt/pull/153>`_,
3119 `#154 <https://github.com/fmtlib/fmt/pull/154>`_).
3123 (`#171 <https://github.com/fmtlib/fmt/issues/171>`_).
3128 (`#205 <https://github.com/fmtlib/fmt/issues/205>`_,
3129 `#208 <https://github.com/fmtlib/fmt/pull/208>`_).
3138 (`#92 <https://github.com/fmtlib/fmt/issues/92>`_,
3139 `#230 <https://github.com/fmtlib/fmt/pull/230>`_).
3142 * Further improved performance of ``fmt::Writer`` on integer formatting
3145 (`#186 <https://github.com/fmtlib/fmt/issues/186>`_).
3148 <https://github.com/fmtlib/fmt#compile-time-and-code-bloat>`_
3149 (`#143 <https://github.com/fmtlib/fmt/issues/143>`_,
3150 `#149 <https://github.com/fmtlib/fmt/pull/149>`_).
3157 (`#178 <https://github.com/fmtlib/fmt/issues/178>`_).
3162 (`#178 <https://github.com/fmtlib/fmt/issues/178>`_).
3170 (`#155 <https://github.com/fmtlib/fmt/issues/155>`_)::
3180 (`#157 <https://github.com/fmtlib/fmt/issues/157>`_)::
3191 (`#128 <https://github.com/fmtlib/fmt/issues/128>`_).
3196 <https://fmt.dev/2.0.0/usage.html#building-the-documentation>`_
3200 (`#189 <https://github.com/fmtlib/fmt/pull/189>`_,
3201 `#209 <https://github.com/fmtlib/fmt/issues/209>`_).
3206 (`#36 <https://github.com/fmtlib/fmt/issues/36>`_,
3207 `#75 <https://github.com/fmtlib/fmt/issues/75>`_,
3208 `#125 <https://github.com/fmtlib/fmt/issues/125>`_,
3209 `#160 <https://github.com/fmtlib/fmt/pull/160>`_,
3210 `#161 <https://github.com/fmtlib/fmt/pull/161>`_,
3211 `#162 <https://github.com/fmtlib/fmt/issues/162>`_,
3212 `#165 <https://github.com/fmtlib/fmt/issues/165>`_,
3213 `#210 <https://github.com/fmtlib/fmt/issues/210>`_).
3218 (`#177 <https://github.com/fmtlib/fmt/issues/177>`_).
3225 (`#136 <https://github.com/fmtlib/fmt/issues/136>`_).
3229 ``fmt::(s)printf``
3230 (`#131 <https://github.com/fmtlib/fmt/issues/131>`_,
3231 `#139 <https://github.com/fmtlib/fmt/issues/139>`_):
3236 fmt::printf("%d", ANSWER);
3241 (`#129 <https://github.com/fmtlib/fmt/issues/129>`_,
3242 `#130 <https://github.com/fmtlib/fmt/pull/130>`_,
3243 `#132 <https://github.com/fmtlib/fmt/issues/132>`_).
3247 (`#144 <https://github.com/fmtlib/fmt/issues/144>`_).
3250 (`#148 <https://github.com/fmtlib/fmt/issues/148>`_).
3252 * Placed the anonymous namespace within ``fmt`` namespace for the header-only
3254 (`#171 <https://github.com/fmtlib/fmt/issues/171>`_).
3258 (`#187 <https://github.com/fmtlib/fmt/issues/187>`_,
3259 `#192 <https://github.com/fmtlib/fmt/issues/192>`_).
3262 (`#188 <https://github.com/fmtlib/fmt/issues/188>`_).
3265 (`#95 <https://github.com/fmtlib/fmt/issues/95>`_,
3266 `#96 <https://github.com/fmtlib/fmt/issues/96>`_,
3267 `#114 <https://github.com/fmtlib/fmt/pull/114>`_,
3268 `#135 <https://github.com/fmtlib/fmt/issues/135>`_,
3269 `#142 <https://github.com/fmtlib/fmt/issues/142>`_,
3270 `#145 <https://github.com/fmtlib/fmt/issues/145>`_,
3271 `#146 <https://github.com/fmtlib/fmt/issues/146>`_,
3272 `#158 <https://github.com/fmtlib/fmt/issues/158>`_,
3273 `#163 <https://github.com/fmtlib/fmt/issues/163>`_,
3274 `#175 <https://github.com/fmtlib/fmt/issues/175>`_,
3275 `#190 <https://github.com/fmtlib/fmt/issues/190>`_,
3276 `#191 <https://github.com/fmtlib/fmt/pull/191>`_,
3277 `#194 <https://github.com/fmtlib/fmt/issues/194>`_,
3278 `#196 <https://github.com/fmtlib/fmt/pull/196>`_,
3279 `#216 <https://github.com/fmtlib/fmt/issues/216>`_,
3280 `#218 <https://github.com/fmtlib/fmt/pull/218>`_,
3281 `#220 <https://github.com/fmtlib/fmt/pull/220>`_,
3282 `#229 <https://github.com/fmtlib/fmt/pull/229>`_,
3283 `#233 <https://github.com/fmtlib/fmt/issues/233>`_,
3284 `#234 <https://github.com/fmtlib/fmt/issues/234>`_,
3285 `#236 <https://github.com/fmtlib/fmt/pull/236>`_,
3286 `#281 <https://github.com/fmtlib/fmt/issues/281>`_,
3287 `#289 <https://github.com/fmtlib/fmt/issues/289>`_).
3304 (`#138 <https://github.com/fmtlib/fmt/issues/138>`_,
3305 `#179 <https://github.com/fmtlib/fmt/issues/179>`_,
3306 `#180 <https://github.com/fmtlib/fmt/issues/180>`_,
3307 `#202 <https://github.com/fmtlib/fmt/issues/202>`_,
3308 `#225 <https://github.com/fmtlib/fmt/issues/225>`_,
3315 (`#211 <https://github.com/fmtlib/fmt/issues/211>`_).
3318 (`#212 <https://github.com/fmtlib/fmt/pull/212>`_).
3322 (`#214 <https://github.com/fmtlib/fmt/pull/214>`_).
3326 (`#236 <https://github.com/fmtlib/fmt/pull/236>`_).
3330 (`#227 <https://github.com/fmtlib/fmt/issues/227>`_).
3333 (`#228 <https://github.com/fmtlib/fmt/pull/228>`_).
3341 (`#105 <https://github.com/fmtlib/fmt/issues/105>`_ and
3342 `#122 <https://github.com/fmtlib/fmt/issues/122>`_):
3347 fmt::ArrayWriter w(buffer);
3354 (`#115 <https://github.com/fmtlib/fmt/pull/115>`_,
3355 `#116 <https://github.com/fmtlib/fmt/pull/116>`_,
3356 `#118 <https://github.com/fmtlib/fmt/pull/118>`_ and
3357 `#121 <https://github.com/fmtlib/fmt/pull/121>`_).
3362 * CMake install target (`#119 <https://github.com/fmtlib/fmt/pull/119>`_).
3368 (`#98 <https://github.com/fmtlib/fmt/pull/98>`_ and
3369 `#104 <https://github.com/fmtlib/fmt/pull/104>`_). Thanks to
3375 (`#107 <https://github.com/fmtlib/fmt/pull/107>`_).
3385 (`#54 <https://github.com/fmtlib/fmt/issues/54>`_).
3388 (`#110 <https://github.com/fmtlib/fmt/pull/110>`_,
3389 `#111 <https://github.com/fmtlib/fmt/pull/111>`_
3390 `#112 <https://github.com/fmtlib/fmt/pull/112>`_).
3394 (`#117 <https://github.com/fmtlib/fmt/issues/117>`_).
3397 is disabled (`#109 <https://github.com/fmtlib/fmt/issues/109>`_).
3400 (`#124 <https://github.com/fmtlib/fmt/issues/124>`_).
3402 * Fixed packaging issues (`#94 <https://github.com/fmtlib/fmt/issues/94>`_).
3404 * Added `changelog <https://github.com/fmtlib/fmt/blob/master/ChangeLog.rst>`_
3405 (`#103 <https://github.com/fmtlib/fmt/issues/103>`_).
3420 (`#79 <https://github.com/fmtlib/fmt/issues/79>`_).
3425 (`#86 <https://github.com/fmtlib/fmt/issues/86>`_):
3429 fmt::format(L"The date is {0}", Date(2012, 12, 9));
3432 (`#89 <https://github.com/fmtlib/fmt/issues/89>`_).
3435 (`#90 <https://github.com/fmtlib/fmt/issues/90>`_):
3439 fmt::print("{:.3}\n", "Carpet"); // prints "Car"
3442 (`#93 <https://github.com/fmtlib/fmt/issues/93>`_)
3449 * Fix error handling in ``fmt::fprintf``.
3459 with small allocations done on stack. So ``fmt::Writer`` should be replaced
3460 with ``fmt::MemoryWriter`` in variable declarations.
3466 fmt::Writer w;
3472 fmt::MemoryWriter w;
3474 If you pass ``fmt::Writer`` by reference, you can continue to do so:
3478 void f(fmt::Writer &w);
3483 (`#69 <https://github.com/fmtlib/fmt/issues/69>`_)
3486 arguments (`#73 <https://github.com/fmtlib/fmt/issues/73>`_):
3493 <https://github.com/fmtlib/fmt#compile-time-and-code-bloat>`_,
3519 fmt::printf("Elapsed time: %.2f seconds", 1.23);
3520 fmt::printf("%1$s, %3$d %2$s", weekday, month, day);
3523 (Issue `#55 <https://github.com/fmtlib/fmt/issues/55>`_):
3527 fmt::format("0x{0:02X}", 'a');
3549 void report_error(const char *format, const fmt::ArgList &args) {
3550 fmt::print("Error: {}");
3551 fmt::print(format, args);
3575 Instead of unsafe ``c_str`` function, ``fmt::Writer`` should be used directly
3580 fmt::Writer w;
3592 Issue `#50 <https://github.com/fmtlib/fmt/issues/50>`_.
3603 fmt::printf("The answer is %d.", 42);
3604 std::string s = fmt::sprintf("Look, a %s!", "string");