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
69a20db0
Commit
69a20db0
authored
Jun 22, 2022
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update changelog and fix an apidoc comment
parent
7a2a97c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
7 deletions
+51
-7
ChangeLog.rst
ChangeLog.rst
+49
-6
include/fmt/color.h
include/fmt/color.h
+2
-1
No files found.
ChangeLog.rst
View file @
69a20db0
...
...
@@ -21,11 +21,41 @@
Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_.
* Added ``fmt::styled`` that applies a text style to an individual argument
(`#2793 <https://github.com/fmtlib/fmt/pull/2793>`_).
For example (`godbolt <https://godbolt.org/z/vWGW7v5M6>`__):
.. code:: c++
#include <fmt/chrono.h>
#include <fmt/color.h>
int main() {
auto now = std::chrono::system_clock::now();
fmt::print(
"[{}] {}: {}\n",
fmt::styled(now, fmt::emphasis::bold),
fmt::styled("error", fg(fmt::color::red)),
"something went wrong");
}
prints
.. image:: https://user-images.githubusercontent.com/576385/
175071215-12809244-dab0-4005-96d8-7cd911c964d5.png
Thanks `@rbrugo (Riccardo Brugo) <https://github.com/rbrugo>`_.
* Implemented escaping of wide strings in ranges
(`#2904 <https://github.com/fmtlib/fmt/pull/2904>`_).
Thanks `@phprus (Vladislav Shchapov) <https://github.com/phprus>`_.
* Made compile-time checks with named arguments of custom types and
* Added support for ranges with ``begin`` / ``end`` found via the
argument-dependent lookup
(`#2807 <https://github.com/fmtlib/fmt/pull/2807>`_).
Thanks `@rbrugo (Riccardo Brugo) <https://github.com/rbrugo>`_.
* Made compile-time checks work with named arguments of custom types and
``std::ostream`` ``print`` overloads
(`#2816 <https://github.com/fmtlib/fmt/issues/2816>`_,
`#2817 <https://github.com/fmtlib/fmt/issues/2817>`_,
...
...
@@ -41,9 +71,15 @@
Thanks `@davidchisnall (David Chisnall) <https://github.com/davidchisnall>`_.
* Improved documentation
(`#2815 <https://github.com/fmtlib/fmt/pull/2815>`_,
(`#2789 <https://github.com/fmtlib/fmt/pull/2789>`_,
`#2803 <https://github.com/fmtlib/fmt/pull/2803>`_,
`#2805 <https://github.com/fmtlib/fmt/pull/2805>`_,
`#2815 <https://github.com/fmtlib/fmt/pull/2815>`_,
`#2924 <https://github.com/fmtlib/fmt/pull/2924>`_).
Thanks `@anoonD (cre) <https://github.com/anoonD>`_,
Thanks `@setoye (Alta) <https://github.com/setoye>`_,
`@rtobar <https://github.com/rtobar>`_,
`@rbrugo (Riccardo Brugo) <https://github.com/rbrugo>`_,
`@anoonD (cre) <https://github.com/anoonD>`_,
`@leha-bot (Alex) <https://github.com/leha-bot>`_.
* Improved build configuration
...
...
@@ -59,9 +95,12 @@
`@Vertexwahn <https://github.com/Vertexwahn>`_.
* Fixed various warnings and compilation issues
(`@timsong-cpp <https://github.com/timsong-cpp>`_,
(`#2796 <https://github.com/fmtlib/fmt/issues/2796>`_,
`#2797 <https://github.com/fmtlib/fmt/pull/2797>`_,
`#2801 <https://github.com/fmtlib/fmt/pull/2801>`_,
`#2802 <https://github.com/fmtlib/fmt/pull/2802>`_,
`#2818 <https://github.com/fmtlib/fmt/issues/2818>`_,
`#2819 <https://github.com/fmtlib/fmt/pull/2819>`_
`#2819 <https://github.com/fmtlib/fmt/pull/2819>`_
,
`#2861 <https://github.com/fmtlib/fmt/pull/2861>`_,
`#2882 <https://github.com/fmtlib/fmt/pull/2882>`_,
`#2892 <https://github.com/fmtlib/fmt/pull/2892>`_,
...
...
@@ -73,7 +112,11 @@
`#2937 <https://github.com/fmtlib/fmt/pull/2937>`_,
`#2938 <https://github.com/fmtlib/fmt/pull/2938>`_,
`#2940 <https://github.com/fmtlib/fmt/pull/2940>`_).
Thanks `@seanm (Sean McBride) <https://github.com/seanm>`_,
Thanks `@dalboris (Boris Dalstein) <https://github.com/dalboris>`_,
`@seanm (Sean McBride) <https://github.com/seanm>`_,
`@gsjaardema (Greg Sjaardema) <https://github.com/gsjaardema>`_,
`@timsong-cpp <https://github.com/timsong-cpp>`_,
`@seanm (Sean McBride) <https://github.com/seanm>`_,
`@frithrah <https://github.com/frithrah>`_,
`@chronoxor (Ivan Shynkarenka) <https://github.com/chronoxor>`_,
`@Agga <https://github.com/Agga>`_,
...
...
include/fmt/color.h
View file @
69a20db0
...
...
@@ -636,7 +636,8 @@ struct formatter<detail::styled_arg<T>, Char> : formatter<T, Char> {
fmt::print("Elapsed time: {s:.2f} seconds",
fmt::styled(1.23, fmt::fg(fmt::color::green) |
fmt::bg(fmt::color::blue))); \endrst
fmt::bg(fmt::color::blue)));
\endrst
*/
template
<
typename
T
>
FMT_CONSTEXPR
auto
styled
(
const
T
&
value
,
text_style
ts
)
...
...
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