Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
8c255771
Commit
8c255771
authored
May 16, 2018
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs and changelog
parent
a68fd44e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
ChangeLog.rst
ChangeLog.rst
+24
-0
doc/api.rst
doc/api.rst
+2
-0
include/fmt/format.h
include/fmt/format.h
+11
-0
No files found.
ChangeLog.rst
View file @
8c255771
...
...
@@ -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++
...
...
doc/api.rst
View file @
8c255771
...
...
@@ -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&)
...
...
include/fmt/format.h
View file @
8c255771
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment