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
0452a4e7
Commit
0452a4e7
authored
Oct 22, 2020
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update changelog
parent
8de96817
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
3 deletions
+73
-3
ChangeLog.rst
ChangeLog.rst
+73
-3
No files found.
ChangeLog.rst
View file @
0452a4e7
7.1.0 - TBD
-----------
* Added an experimental unsynchronized file output API which, together with
format string compilation, can give [5-9 times speed up compared to
`fprintf`](https://www.zverovich.net/2020/08/04/optimal-file-buffer-size.html)
on common platforms:
.. code:: c++
#include <fmt/os.h>
int main() {
auto f = fmt::output_file("guide");
f.print("The answer is {}.", 42);
}
* Improved handling of single code units in `FMT_COMPILE`. For example:
.. code:: c++
#include <fmt/compile.h>
char* f(char* buf) {
return fmt::format_to(buf, FMT_COMPILE("x{}"), 42);
}
compiles to just (`godbolt <https://godbolt.org/z/5vncz3>`__):
.. code:: asm
_Z1fPc:
movb $120, (%rdi)
xorl %edx, %edx
cmpl $42, _ZN3fmt2v76detail10basic_dataIvE23zero_or_powers_of_10_32E+8(%rip)
movl $3, %eax
seta %dl
subl %edx, %eax
movzwl _ZN3fmt2v76detail10basic_dataIvE6digitsE+84(%rip), %edx
cltq
addq %rdi, %rax
movw %dx, -2(%rax)
ret
Here a single `mov` instruction writes `'x'` (`$120`) to the output buffer.
* Improved error reporting for unformattable types: now you'll get the type name
directly in the error message instead of the note:
.. code:: c++
#include <fmt/core.h>
struct how_about_no {};
int main() {
fmt::print("{}", how_about_no());
}
Error (`godbolt <https://godbolt.org/z/GoxM4e>`__):
fmt/core.h:1438:3: error: static_assert failed due to requirement
'fmt::v7::formattable<how_about_no>()' "Cannot format an argument.
To make type T formattable provide a formatter<T> specialization:
https://fmt.dev/dev/api.html#udt"
...
* Fixed handling of types that have both an implicit conversion operator and
an overloaded `ostream` insertion operator
(`#1766 <https://github.com/fmtlib/fmt/issues/1766>`_).
* Build configuration improvements
(`#1760 <https://github.com/fmtlib/fmt/pull/1760>`_).
Thanks `@xvitaly (Vitaly Zaitsev) <https://github.com/xvitaly>`_.
(`#1760 <https://github.com/fmtlib/fmt/pull/1760>`_,
`#1770 <https://github.com/fmtlib/fmt/pull/1770>`_).
Thanks `@dvetutnev (Dmitriy Vetutnev) <https://github.com/dvetutnev>`_,
`@xvitaly (Vitaly Zaitsev) <https://github.com/xvitaly>`_.
7.0.3 - 2020-08-06
------------------
...
...
@@ -195,7 +265,7 @@
Thanks `@BRevzin (Barry Revzin) <https://github.com/BRevzin>`_.
* Added support for named args, ``clear`` and ``reserve`` to
* Added support for named arg
ument
s, ``clear`` and ``reserve`` to
``dynamic_format_arg_store``
(`#1655 <https://github.com/fmtlib/fmt/issues/1655>`_,
`#1663 <https://github.com/fmtlib/fmt/pull/1663>`_,
...
...
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