Commit 8c255771 authored by Victor Zverovich's avatar Victor Zverovich

Update docs and changelog

parent a68fd44e
......@@ -52,6 +52,17 @@
<source>:12:45: error: expression '<throw-expression>' is not a constant expression
throw format_error("invalid specifier");
* Added `iterator support
<http://fmtlib.net/dev/api.html#output-iterator-support>`_:
.. code:: c++
#include <vector>
#include <fmt/format.h>
std::vector<char> out;
fmt::format_to(std::back_inserter(out), "{}", 42);
* Improved compile times by reducing dependencies on standard headers and
providing a lightweight `core API <http://fmtlib.net/dev/api.html#core-api>`_:
......@@ -94,6 +105,19 @@
in the format API and provided ``fmt::string_view`` which implements a subset
of ``std::string_view`` API for pre-C++17 systems.
* Added support for ``std::experimental::string_view``
(`#607 <https://github.com/fmtlib/fmt/pull/607>`_):
.. code:: c++
#include <fmt/core.h>
#include <experimental/string_view>
fmt::print("{}", std::experimental::string_view("foo"));
Thanks `@virgiliofornazin (Virgilio Alexandre Fornazin)
<https://github.com/virgiliofornazin>`_.
* Allowed mixing named and automatic arguments:
.. code:: c++
......
......@@ -151,6 +151,8 @@ The following user-defined literals are defined in ``fmt/format.h``.
Utilities
---------
.. dosygenfunction:: fmt::formatted_size(string_view, const Args&...)
.. doxygenfunction:: fmt::to_string(const T&)
.. doxygenfunction:: fmt::to_wstring(const T&)
......
......@@ -3450,6 +3450,17 @@ inline OutputIt vformat_to(OutputIt out, string_view format_str,
return vformat_to<arg_formatter<range>>(range(out), format_str, args);
}
/**
\rst
Formats arguments, writes the result to the output iterator ``out`` and returns
the iterator past the end of the output range.
**Example**::
std::vector<char> out;
fmt::format_to(std::back_inserter(out), "{}", 42);
\endrst
*/
template <typename OutputIt, typename... Args>
inline OutputIt format_to(OutputIt out, string_view format_str,
const Args & ... args) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment