From 587a7f6634a424e6f0c63655b9d22500743de503 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 24 Dec 2018 10:56:13 -0800 Subject: [PATCH] Update changelog and docs --- ChangeLog.rst | 106 ++++++++++++++++++++++++++++++++++++++++++++------ doc/api.rst | 2 +- 2 files changed, 95 insertions(+), 13 deletions(-) diff --git a/ChangeLog.rst b/ChangeLog.rst index 367aa6d8..18294039 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -1,11 +1,13 @@ 5.3.0 - TBD +----------- * Parameterized formatting functions on the type of the format string (`#880 `_, `#881 `_, `#883 `_, - `#889 `_, - `#897 `_). + `#885 `_, + `#897 `_, + `#920 `_). An object of a type that has an overloaded `to_string_view` returning `fmt::string_view` can be used as a format string: @@ -30,12 +32,14 @@ Thanks `@DanielaE (Daniela Engert) `_. -* Added experimental Unicode support - (`#628 `_, - `#891 `_): +* Added wide string support to compile-time format string checks + (`#924 `_): - using namespace fmt::literals; - auto s = fmt::format("{:*^5}"_u, "🤡"_u); // s == "**🤡**"_u + .. code:: c++ + + print(fmt(L"{:f}"), 42); // compile-time error: invalid type specifier + + Thanks `@XZiar `_. * Made colored print functions work with wide strings (`#867 `_): @@ -50,7 +54,53 @@ Thanks `@DanielaE (Daniela Engert) `_. -* Deprecated ``fmt::visit``. Use ``fmt::visit_format_arg`` instead. +* Introduced experimental Unicode support + (`#628 `_, + `#891 `_): + + .. code:: c++ + + using namespace fmt::literals; + auto s = fmt::format("{:*^5}"_u, "🤡"_u); // s == "**🤡**"_u + +* Improved locale support: + + .. code:: c++ + + #include + + struct numpunct : std::numpunct { + protected: + char do_thousands_sep() const override { return '~'; } + }; + + std::locale loc; + auto s = fmt::format(std::locale(loc, new numpunct()), "{:n}", 1234567); + // s == "1~234~567" + +* Constrained formatting functions on proper iterator types + (`#921 `_): + Thanks `@DanielaE (Daniela Engert) `_. + +* Added ``make_printf_args`` and ``make_wprintf_args`` functions + (`#934 `_). + Thanks `@tnovotny `_. + +* Deprecated ``fmt::visit``, ``parse_context``, and ``wparse_context``. + Use ``fmt::visit_format_arg``, ``format_parse_context``, and + ``wformat_parse_context`` instead. + +* Removed undocumented ``basic_fixed_buffer`` which has been superseded by the + iterator-based API + (`#873 `_, + `#902 `_). + Thanks `@superfunc (hollywood programmer) `_. + +* Disallowed repeated leading zeros in an argument ID: + + .. code:: c++ + + fmt::print("{000}", 42); // error * Reintroduced support for gcc 4.4. @@ -59,18 +109,50 @@ * Improved documentation (`#877 `_, - `#901 `_). - Thanks `@kookjr (Mathew Cucuzella) `_. + `#901 `_, + `#906 `_). + Thanks `@kookjr (Mathew Cucuzella) `_, + `@DarkDimius (Dmitry Petrashko) `_. + +* Added `pkgconfig` support which makes it easier to consume the library from + `meson` and other build systems + (`#916 `_). + Thanks `@colemickens (Cole Mickens) `_. + +* Improved build config + (`#909 `_, + `#926 `_, + `#937 `_). + Thanks `@tchaikov (Kefu Chai) `_, + `@luncliff (Park DongHa) `_, + `@AndreasSchoenle (Andreas Schönle) `_. + +* Improved `string_view` construction performance + (`#914 `_). + Thanks `@gabime (Gabi Melman) `_. * Fixed non-matching char types (`#895 `_). Thanks `@DanielaE (Daniela Engert) `_. +* Fixed ``format_to_n`` with ``std::back_insert_iterator`` + (`#913 `_). + Thanks `@DanielaE (Daniela Engert) `_. + +* Fixed locale-dependent formatting + (`#905 `_). + * Fixed various compiler warnings and errors (`#882 `_, - `#886 `_). + `#886 `_, + `#933 `_, + `#941 `_, + `#931 `_ + `#943 `_). Thanks `@Luthaf (Guillaume Fraux) `_, - `@stevenhoving (Steven Hoving) `_. + `@stevenhoving (Steven Hoving) `_, + `@christinaa (Kristina Brooks) `_, + `@lgritz (Larry Gritz) `_. 5.2.1 - 2018-09-21 ------------------ diff --git a/doc/api.rst b/doc/api.rst index a8c91b6c..33a4f6d2 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -209,7 +209,7 @@ Utilities .. doxygenfunction:: fmt::to_wstring(const T&) -.. doxygenfunction:: fmt::to_string_view(const T&) +.. doxygenfunction:: fmt::to_string_view(basic_string_view) .. doxygenclass:: fmt::basic_memory_buffer :protected-members: