chore(deps): update dependency fmt to v11 #2835
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
10.2.1
->11.0.1
Release Notes
fmtlib/fmt (fmt)
v11.0.1
Compare Source
Fixed version number in the inline namespace
https://github.com/fmtlib/fmt/issues/40474047).
Fixed disabling Unicode support via CMake
https://github.com/fmtlib/fmt/issues/40514051).
Fixed deprecated
visit_format_arg
(https://github.com/fmtlib/fmt/pull/4043).Thanks @nebkat.
Fixed handling of a sign and improved the
std::complex
formaterhttps://github.com/fmtlib/fmt/pull/403440https://github.com/fmtlib/fmt/pull/4050ull/4050). Thanks @tesch1 and @phprus.
Removed a redundant check in the formatter for
std::expected
https://github.com/fmtlib/fmt/pull/40404040). Thanks @phprus.
v11.0.0
Compare Source
Added
fmt/base.h
which provides a subset of the API with minimal includedependencies and enough functionality to replace all uses of the
printf
family of functions. This brings the compile time of code using {fmt} much
closer to the equivalent
printf
code as shown on the following benchmarkthat compiles 100 source files:
This gives almost 4x improvement in build speed compared to version 10.
Note that the benchmark is purely formatting code and includes. In real
projects the difference from
printf
will be smaller partly because commonstandard headers will be included in almost any translation unit (TU) anyway.
In particular, in every case except
printf
above ~1s is spent in total onincluding
<type_traits>
in all TUs.Optimized includes in other headers such as
fmt/format.h
which is nowroughly equivalent to the old
fmt/core.h
in terms of build speed.Migrated the documentation at https://fmt.dev/ from Sphinx to MkDocs.
Improved C++20 module support
https://github.com/fmtlib/fmt/issues/399039https://github.com/fmtlib/fmt/pull/3991ulhttps://github.com/fmtlib/fmt/issues/3993/ihttps://github.com/fmtlib/fmt/pull/3994ibhttps://github.com/fmtlib/fmt/pull/3997fmhttps://github.com/fmtlib/fmt/pull/3998cohttps://github.com/fmtlib/fmt/pull/4004huhttps://github.com/fmtlib/fmt/pull/4005/ghttps://github.com/fmtlib/fmt/pull/4006pshttps://github.com/fmtlib/fmt/pull/4013 hhttps://github.com/fmtlib/fmt/pull/4027
https://github.com/fmtlib/fmt/pull/4029027,
Module purview can only contain direct preprocessor code fmtlib/fmt#4029). In particular, native CMake support
for modules is now used if available. Thanks @yujincheng08 and @matt77hias.
Added an option to replace standard includes with
import std
enabled viathe
FMT_IMPORT_STD
macro (https://github.com/fmtlib/fmt/issues/3921,https://github.com/fmtlib/fmt/pull/39283928). Thanks @matt77hias.
Exported
fmt::range_format
,fmt::range_format_kind
andfmt::compiled_string
from thefmt
modulehttps://github.com/fmtlib/fmt/pull/397039https://github.com/fmtlib/fmt/pull/3999ull/3999).
Thanks @matt77hias and @yujincheng08.
Improved integration with stdio in
fmt::print
, enabling direct writesinto a C stream buffer in common cases. This may give significant
performance improvements ranging from tens of percent to 2x and eliminates dynamic memory
allocations on the buffer level. It is currently enabled for built-in and
string types with wider availability coming up in future releases.
For example, it gives ~24% improvement on a simple benchmark compiled with Apple clang
version 15.0.0 (clang-1500.1.0.2.5) and run on macOS 14.2.1:
Improved safety of
fmt::format_to
when writing to an arrayhttps://github.com/fmtlib/fmt/pull/38053805).
For example (godbolt):
no longer results in a buffer overflow. Instead the output will be truncated
and you can get the end iterator and whether truncation occurred from the
result
object. Thanks @ThePhD.Enabled Unicode support by default in MSVC, bringing it on par with other
compilers and making it unnecessary for users to enable it explicitly.
Most of {fmt} is encoding-agnostic but this prevents mojibake in places
where encoding matters such as path formatting and terminal output.
You can control the Unicode support via the CMake
FMT_UNICODE
option.Note that some {fmt} packages such as the one in vcpkg have already been
compiled with Unicode enabled.
Added a formatter for
std::expected
https://github.com/fmtlib/fmt/pull/38343834). Thanks @dominicpoeschko.
Added a formatter for
std::complex
https://github.com/fmtlib/fmt/issues/146714https://github.com/fmtlib/fmt/issues/3886uehttps://github.com/fmtlib/fmt/pull/3892mthttps://github.com/fmtlib/fmt/pull/3900ib/fmt/pull/3900). Thanks @phprus.
Added a formatter for
std::type_info
https://github.com/fmtlib/fmt/pull/39783978). Thanks @matt77hias.
Specialized
formatter
forstd::basic_string
types with custom traitsand allocatohttps://github.com/fmtlib/fmt/issues/393839https://github.com/fmtlib/fmt/pull/3943ull/3943). Thanks @dieram3.
Added formatters for
std::chrono::day
,std::chrono::month
,std::chrono::year
andstd::chrono::year_month_day
https://github.com/fmtlib/fmt/issues/375837https://github.com/fmtlib/fmt/issues/3772uehttps://github.com/fmtlib/fmt/pull/3906mthttps://github.com/fmtlib/fmt/pull/3913ib/fmt/pull/3913). For example:
prints a green day:
Thanks @zivshek.
Fixed handling of precision in
%S
(https://github.com/fmtlib/fmt/issues/3794,https://github.com/fmtlib/fmt/pull/38143814). Thanks @js324.
Added support for the
-
specifier (glibcstrftime
extension) to day ofthe month (
%d
) and week of the year (%W
,%U
,%V
) specifiershttps://github.com/fmtlib/fmt/pull/39763976). Thanks @ZaheenJ.
Fixed the scope of the
-
extension in chrono formatting so that it doesn'tapply to subsequent specifiehttps://github.com/fmtlib/fmt/issues/381138https://github.com/fmtlib/fmt/pull/3812ull/3812). Thanks @phprus.
Improved handling of
time_point::min()
https://github.com/fmtlib/fmt/issues/32823282).
Added support for character range formatting
https://github.com/fmtlib/fmt/issues/385738https://github.com/fmtlib/fmt/pull/3863ull/3863). Thanks @js324.
Added
string
anddebug_string
range formattershttps://github.com/fmtlib/fmt/pull/397339https://github.com/fmtlib/fmt/pull/4024ull/4024). Thanks @matt77hias.
Enabled ADL for
begin
andend
infmt::join
https://github.com/fmtlib/fmt/issues/381338https://github.com/fmtlib/fmt/pull/3824ull/3824). Thanks @bbolli.
Made contiguous iterator optimizations apply to
std::basic_string
iteratorshttps://github.com/fmtlib/fmt/pull/37983798). Thanks @phprus.
Added support for ranges with mutable
begin
andend
https://github.com/fmtlib/fmt/issues/375237https://github.com/fmtlib/fmt/pull/3800ulhttps://github.com/fmtlib/fmt/pull/3955mt/pull/3955). Thanks @tcbrindle and @Arghnews.
Added support for move-only iterators to
fmt::join
https://github.com/fmtlib/fmt/issues/380238https://github.com/fmtlib/fmt/pull/3946ull/3946). Thanks @Arghnews.
Moved range and iterator overloads of
fmt::join
tofmt/ranges.h
, nextto other overloads.
Fixed handling of types with
begin
returningvoid
such as Eigen matriceshttps://github.com/fmtlib/fmt/issues/383938https://github.com/fmtlib/fmt/pull/3964ull/3964). Thanks @Arghnews.
Added an
fmt::formattable
concept (https://github.com/fmtlib/fmt/pull/3974).Thanks @matt77hias.
Added support for
__float128
(https://github.com/fmtlib/fmt/issues/3494).Fixed rounding issues when formatting
long double
with fixed precisionhttps://github.com/fmtlib/fmt/issues/35393539).
Made
fmt::isnan
not trigger floating-point exception for NaN valueshttps://github.com/fmtlib/fmt/issues/394839https://github.com/fmtlib/fmt/pull/3951ull/3951). Thanks @alexdewar.
Removed dependency on
<memory>
forstd::allocator_traits
when possiblehttps://github.com/fmtlib/fmt/pull/38043804). Thanks @phprus.
Enabled compile-time checks in formatting functions that take text colors and
styles.
Deprecated wide stream overloads of
fmt::print
that take text styles.Made format string compilation work with clang 12 and later despite
only partial non-type template parameter suppohttps://github.com/fmtlib/fmt/issues/4000uehttps://github.com/fmtlib/fmt/pull/4001mt/pull/4001). Thanks @yujincheng08.
Made
fmt::iterator_buffer
's move constructornoexcept
https://github.com/fmtlib/fmt/pull/38083808). Thanks @waywardmonkeys.
Started enforcing that
formatter::format
is const for compatibilitywith
std::format
(https://github.com/fmtlib/fmt/issues/3447).Added
fmt::basic_format_arg::visit
and deprecatedfmt::visit_format_arg
.Made
fmt::basic_string_view
not constructible fromnullptr
forconsistency with
std::string_view
in C++23https://github.com/fmtlib/fmt/pull/38463846). Thanks @dalle.
Fixed
fmt::group_digits
for negative integershttps://github.com/fmtlib/fmt/issues/389138https://github.com/fmtlib/fmt/pull/3901ull/3901). Thanks @phprus.
Fixed handling of negative ids in
fmt::basic_format_args::get
https://github.com/fmtlib/fmt/pull/39453945). Thanks @marlenecota.
Improved named argument validation
https://github.com/fmtlib/fmt/issues/38173817).
Disabled copy construction/assignment for
fmt::format_arg_store
andfixed moved constructihttps://github.com/fmtlib/fmt/pull/38333833).
Thanks @ivafanas.
Worked around a locale issue in RHEL/devtoolset
https://github.com/fmtlib/fmt/issues/385838https://github.com/fmtlib/fmt/pull/3859ull/3859). Thanks @g199209.
Added RTTI detection for MSVC (https://github.com/fmtlib/fmt/pull/3821,
https://github.com/fmtlib/fmt/pull/39633963). Thanks @edo9300.
Migrated the documentation from Sphinx to MkDocs.
Improved documentation and README
https://github.com/fmtlib/fmt/issues/377537https://github.com/fmtlib/fmt/pull/3784ulhttps://github.com/fmtlib/fmt/issues/3788/ihttps://github.com/fmtlib/fmt/pull/3789ibhttps://github.com/fmtlib/fmt/pull/3793fmhttps://github.com/fmtlib/fmt/issues/3818m/https://github.com/fmtlib/fmt/pull/3820huhttps://github.com/fmtlib/fmt/pull/3822/ghttps://github.com/fmtlib/fmt/pull/3843pshttps://github.com/fmtlib/fmt/pull/3890 hhttps://github.com/fmtlib/fmt/issues/3894 https://github.com/fmtlib/fmt/pull/389589https://github.com/fmtlib/fmt/pull/3905llhttps://github.com/fmtlib/fmt/issues/3942puhttps://github.com/fmtlib/fmt/pull/4008fmt/issues/3942,
README.md: update to remove "not yet release" remarks on clang-tidy fmtlib/fmt#4008).
Thanks @zencatalyst, WolleTD, @tupaschoal, @Dobiasd, @frank-weinberg, @bbolli,
@phprus, @waywardmonkeys, @js324 and @tchaikov.
Improved CI and tests
https://github.com/fmtlib/fmt/issues/387838https://github.com/fmtlib/fmt/pull/3883ulhttps://github.com/fmtlib/fmt/issues/3897/ihttps://github.com/fmtlib/fmt/pull/3979ibhttps://github.com/fmtlib/fmt/pull/3980fmhttps://github.com/fmtlib/fmt/pull/3988cohttps://github.com/fmtlib/fmt/pull/4010huhttps://github.com/fmtlib/fmt/pull/4012/ghttps://github.com/fmtlib/fmt/pull/4038ps://github.com/Change actions/github-script from e69ef54 -> 60a0d83 fmtlib/fmt#4038).
Thanks @vgorrX, @waywardmonkeys, @tchaikov and @phprus.
Fixed buffer overflow when using format string compilation with debug format
and
std::back_insert_iterator
(https://github.com/fmtlib/fmt/issues/3795,https://github.com/fmtlib/fmt/pull/37973797). Thanks @phprus.
Improved Bazel support
https://github.com/fmtlib/fmt/pull/379237https://github.com/fmtlib/fmt/pull/3801ulhttps://github.com/fmtlib/fmt/pull/3962mthttps://github.com/fmtlib/fmt/pull/3965ib/fmt/pull/3965). Thanks @Vertexwahn.
Improved/fixed the CMake config
https://github.com/fmtlib/fmt/issues/377737https://github.com/fmtlib/fmt/pull/3783ulhttps://github.com/fmtlib/fmt/issues/3847/ihttps://github.com/fmtlib/fmt/pull/3907ib/fmt/pull/3907). Thanks @phprus and @xTachyon.
Fixed various warnings and compilation issues
https://github.com/fmtlib/fmt/issues/368536https://github.com/fmtlib/fmt/issues/3769uehttps://github.com/fmtlib/fmt/issues/3796/ihttps://github.com/fmtlib/fmt/issues/3803/fhttps://github.com/fmtlib/fmt/pull/3806fmhttps://github.com/fmtlib/fmt/pull/3807cohttps://github.com/fmtlib/fmt/issues/3809b.https://github.com/fmtlib/fmt/pull/3810/ghttps://github.com/fmtlib/fmt/issues/3830:/https://github.com/fmtlib/fmt/pull/3832 hhttps://github.com/fmtlib/fmt/issues/3835 https://github.com/fmtlib/fmt/pull/384483https://github.com/fmtlib/fmt/issues/3854/3https://github.com/fmtlib/fmt/pull/3856ishttps://github.com/fmtlib/fmt/pull/3865b/https://github.com/fmtlib/fmt/pull/3866mthttps://github.com/fmtlib/fmt/pull/3880omhttps://github.com/fmtlib/fmt/issues/3881.chttps://github.com/fmtlib/fmt/issues/3884ubhttps://github.com/fmtlib/fmt/issues/3898gihttps://github.com/fmtlib/fmt/pull/3899tphttps://github.com/fmtlib/fmt/pull/3909 https://github.com/fmtlib/fmt/pull/391799https://github.com/fmtlib/fmt/pull/3923l/https://github.com/fmtlib/fmt/pull/3924/phttps://github.com/fmtlib/fmt/issues/3925mthttps://github.com/fmtlib/fmt/pull/3930ibhttps://github.com/fmtlib/fmt/pull/3931fmhttps://github.com/fmtlib/fmt/pull/3933b.https://github.com/fmtlib/fmt/issues/3935huhttps://github.com/fmtlib/fmt/pull/3937/ghttps://github.com/fmtlib/fmt/pull/3967pshttps://github.com/fmtlib/fmt/pull/3968 https://github.com/fmtlib/fmt/pull/39727,https://github.com/fmtlib/fmt/pull/3983/3https://github.com/fmtlib/fmt/issues/3992llhttps://github.com/fmtlib/fmt/pull/3995t/https://github.com/fmtlib/fmt/pull/4009b/https://github.com/fmtlib/fmt/pull/4023mtlib/fmt/issues/3992,
Added generator expression to /utf-8 compile option fmtlib/fmt#3995,
Add FMT_FORCE_FALLBACK_FILE to force the use of fallback_file fmtlib/fmt#4009,
Suppress a bogus warning in MSVC fmtlib/fmt#4023).
Thanks @hmbj, @phprus, @res2k, @Baardi, @matt77hias, @waywardmonkeys, @hmbj,
@yakra, @prlw1, @Arghnews, @mtillmann0, @ShifftC, @eepp, @jimmy-park and
@ChristianGebhardt.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.