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
84e5170c
Commit
84e5170c
authored
Dec 24, 2018
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update changelog and deprecate visit
parent
130e412b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
14 deletions
+40
-14
ChangeLog.rst
ChangeLog.rst
+38
-13
include/fmt/core.h
include/fmt/core.h
+2
-1
No files found.
ChangeLog.rst
View file @
84e5170c
5.
2.2
- TBD
5.
3.0
- TBD
* Parameterized and constrained formatting functions on the type of the format
* Parameterized formatting functions on the type of the format string
string
(`#880 <https://github.com/fmtlib/fmt/issues/880>`_,
(`#880 <https://github.com/fmtlib/fmt/issues/880>`_,
`#881 <https://github.com/fmtlib/fmt/pull/881>`_,
`#881 <https://github.com/fmtlib/fmt/pull/881>`_,
`#883 <https://github.com/fmtlib/fmt/pull/883>`_). An object of a type that
`#883 <https://github.com/fmtlib/fmt/pull/883>`_,
has an overloaded `to_string_view` returning `fmt::string_view` can be used
`#889 <https://github.com/fmtlib/fmt/pull/889>`_,
as a format string:
`#897 <https://github.com/fmtlib/fmt/pull/897>`_).
An object of a type that has an overloaded `to_string_view` returning
`fmt::string_view` can be used as a format string:
.. code:: c++
.. code:: c++
namespace my_ns {
namespace my_ns {
inline string_view to_string_view(const my_string
&
s) {
inline string_view to_string_view(const my_string
&
s) {
return {
s.data(), s.length()
};
return {
s.data(), s.length()
};
}
}
}
}
std::string message = fmt::format(my_string("The answer is {}"), 42);
std::string message = fmt::format(my_string("The answer is {}
.
"), 42);
Thanks `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_.
Thanks `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_.
* Made ``std::[experimental::]string_view`` work as a format string
(`#898 <https://github.com/fmtlib/fmt/pull/898>`_):
.. code:: c++
auto message = fmt::format(std::string_view("The answer is {}."), 42);
Thanks `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_.
* Added experimental Unicode support
(`#628 <https://github.com/fmtlib/fmt/issues/628>`_,
`#891 <https://github.com/fmtlib/fmt/pull/891>`_):
using namespace fmt::literals;
auto s = fmt::format("{:*^5}"_u, "🤡"_u); // s == "**🤡**"_u
* Made colored print functions work with wide strings
* Made colored print functions work with wide strings
(`#867 <https://github.com/fmtlib/fmt/pull/867>`_):
(`#867 <https://github.com/fmtlib/fmt/pull/867>`_):
...
@@ -33,17 +50,25 @@
...
@@ -33,17 +50,25 @@
Thanks `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_.
Thanks `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_.
* Deprecated ``fmt::visit``. Use ``fmt::visit_format_arg`` instead.
* Reintroduced support for gcc 4.4.
* Reintroduced support for gcc 4.4.
* Fixed compilation on platforms with exotic ``double``
* Fixed compilation on platforms with exotic ``double``
(`#878 <https://github.com/fmtlib/fmt/issues/878>`_).
(`#878 <https://github.com/fmtlib/fmt/issues/878>`_).
* Clarified that writing to ``memory_buffer`` appends
* Improved documentation
(`#877 <https://github.com/fmtlib/fmt/issues/877>`_).
(`#877 <https://github.com/fmtlib/fmt/issues/877>`_,
`#901 <https://github.com/fmtlib/fmt/pull/901>`_).
Thanks `@kookjr (Mathew Cucuzella) <https://github.com/kookjr>`_.
* Fixed non-matching char types
(`#895 <https://github.com/fmtlib/fmt/pull/895>`_).
Thanks `@DanielaE (Daniela Engert) <https://github.com/DanielaE>`_.
* Fixed various compiler warnings and errors
* Fixed various compiler warnings and errors
(`#882 <https://github.com/fmtlib/fmt/pull/882>`_,
(`#882 <https://github.com/fmtlib/fmt/pull/882>`_,
`#886 <https://github.com/fmtlib/fmt/pull/886>`_).
`#886 <https://github.com/fmtlib/fmt/pull/886>`_).
Thanks `@Luthaf (Guillaume Fraux) <https://github.com/Luthaf>`_,
Thanks `@Luthaf (Guillaume Fraux) <https://github.com/Luthaf>`_,
`@stevenhoving (Steven Hoving) <https://github.com/stevenhoving>`_.
`@stevenhoving (Steven Hoving) <https://github.com/stevenhoving>`_.
...
...
include/fmt/core.h
View file @
84e5170c
...
@@ -443,7 +443,7 @@ typedef basic_string_view<wchar_t> wstring_view;
...
@@ -443,7 +443,7 @@ typedef basic_string_view<wchar_t> wstring_view;
namespace my_ns {
namespace my_ns {
inline string_view to_string_view(const my_string &s) {
inline string_view to_string_view(const my_string &s) {
return { s.data(), s.length()
};
return {s.data(), s.length()
};
}
}
}
}
...
@@ -865,6 +865,7 @@ FMT_CONSTEXPR typename internal::result_of<Visitor(int)>::type
...
@@ -865,6 +865,7 @@ FMT_CONSTEXPR typename internal::result_of<Visitor(int)>::type
return
vis
(
monostate
());
return
vis
(
monostate
());
}
}
// DEPRECATED!
template
<
typename
Visitor
,
typename
Context
>
template
<
typename
Visitor
,
typename
Context
>
FMT_CONSTEXPR
typename
internal
::
result_of
<
Visitor
(
int
)
>::
type
FMT_CONSTEXPR
typename
internal
::
result_of
<
Visitor
(
int
)
>::
type
visit
(
Visitor
&&
vis
,
const
basic_format_arg
<
Context
>
&
arg
)
{
visit
(
Visitor
&&
vis
,
const
basic_format_arg
<
Context
>
&
arg
)
{
...
...
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