mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Update docs and changelog
This commit is contained in:
parent
a68fd44ecc
commit
8c2557710d
@ -52,6 +52,17 @@
|
|||||||
<source>:12:45: error: expression '<throw-expression>' is not a constant expression
|
<source>:12:45: error: expression '<throw-expression>' is not a constant expression
|
||||||
throw format_error("invalid specifier");
|
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
|
* Improved compile times by reducing dependencies on standard headers and
|
||||||
providing a lightweight `core API <http://fmtlib.net/dev/api.html#core-api>`_:
|
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
|
in the format API and provided ``fmt::string_view`` which implements a subset
|
||||||
of ``std::string_view`` API for pre-C++17 systems.
|
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:
|
* Allowed mixing named and automatic arguments:
|
||||||
|
|
||||||
.. code:: c++
|
.. code:: c++
|
||||||
|
@ -151,6 +151,8 @@ The following user-defined literals are defined in ``fmt/format.h``.
|
|||||||
Utilities
|
Utilities
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
.. dosygenfunction:: fmt::formatted_size(string_view, const Args&...)
|
||||||
|
|
||||||
.. doxygenfunction:: fmt::to_string(const T&)
|
.. doxygenfunction:: fmt::to_string(const T&)
|
||||||
|
|
||||||
.. doxygenfunction:: fmt::to_wstring(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);
|
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>
|
template <typename OutputIt, typename... Args>
|
||||||
inline OutputIt format_to(OutputIt out, string_view format_str,
|
inline OutputIt format_to(OutputIt out, string_view format_str,
|
||||||
const Args & ... args) {
|
const Args & ... args) {
|
||||||
|
Loading…
Reference in New Issue
Block a user