Opened 10 months ago
Closed 10 months ago
#20028 closed enhancement (fixed)
fmt-11.0.0
Reported by: | Bruce Dubbs | Owned by: | Bruce Dubbs |
---|---|---|---|
Priority: | normal | Milestone: | 12.2 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
New major version.
Change History (3)
comment:1 by , 10 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 10 months ago
comment:3 by , 10 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed at commits
40e6b6cbde Update to fmt-11.0.0. a649d19576 Update to libqalculate-5.2.0. 0c075aa0c8 Update to unix-tree-2.1.2. 11196d674e Update to p11-kit-0.25.4.
Note:
See TracTickets
for help on using tickets.
# 11.0.0 - 2024-07-01
fmt/base.h
which provides a subset of the API with minimal include dependencies and enough functionality to replace all uses of theprintf
family of functions. This brings the compile time of code using {fmt} much closer to the equivalentprintf
code as shown on the following benchmark that 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 fromprintf
will be smaller partly because common standard headers will be included in almost any translation unit (TU) anyway. In particular, in every case exceptprintf
above ~1s is spent in total on including<type_traits>
in all TUs.fmt/format.h
which is now roughly equivalent to the oldfmt/core.h
in terms of build speed.import std
enabled via theFMT_IMPORT_STD
macrofmt::range_format
,fmt::range_format_kind
andfmt::compiled_string
from thefmt
modulefmt::print
, enabling direct writes into a C stream buffer in common cases. This may give significant performance improvements ranging from tens of percent to [2x]( https://stackoverflow.com/a/78457454/471164) 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.fmt::format_to
when writing to an array For example 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 theresult
object.FMT_UNICODE
option. Note that some {fmt} packages such as the one in vcpkg have already been compiled with Unicode enabled.std::expected
std::complex
std::type_info
formatter
forstd::basic_string
types with custom traits and allocatorsstd::chrono::day
,std::chrono::month
,std::chrono::year
andstd::chrono::year_month_day
For example:%S
-
specifier (glibcstrftime
extension) to day of the month (%d
) and week of the year (%W
,%U
,%V
) specifiers-
extension in chrono formatting so that it doesn't apply to subsequent specifierstime_point::min()
string
anddebug_string
range formattersbegin
andend
infmt::join
std::basic_string
iteratorsbegin
andend
fmt::join
fmt::join
tofmt/ranges.h
, next to other overloads.fmt/base.h
which provides a subset of the API with minimal include dependencies and enough functionality to replace all uses of theprintf
family of functions. This brings the compile time of code using {fmt} much closer to the equivalentprintf
code as shown on the following benchmark that 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 fromprintf
will be smaller partly because common standard headers will be included in almost any translation unit (TU) anyway. In particular, in every case exceptprintf
above ~1s is spent in total on including<type_traits>
in all TUs.fmt/format.h
which is now roughly equivalent to the oldfmt/core.h
in terms of build speed.import std
enabled via theFMT_IMPORT_STD
macrofmt::range_format
,fmt::range_format_kind
andfmt::compiled_string
from thefmt
modulefmt::print
, enabling direct writes into a C stream buffer in common cases. This may give significant performance improvements ranging from tens of percent to [2x]( https://stackoverflow.com/a/78457454/471164) 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.begin
returningvoid
such as Eigen matricesfmt::formattable
concept__float128
(https://github.com/fmtlib/fmt/issues/3494).long double
with fixed precisionfmt::isnan
not trigger floating-point exception for NaN values<memory>
forstd::allocator_traits
when possiblefmt::print
that take text styles.fmt::iterator_buffer
's move constructornoexcept
formatter::format
is const for compatibility withstd::format
fmt::basic_format_arg::visit
and deprecatedfmt::visit_format_arg
.fmt::basic_string_view
not constructible fromnullptr
for consistency withstd::string_view
in C++23fmt::group_digits
for negative integersfmt::basic_format_args::get
fmt::format_arg_store
and fixed moved constructionstd::back_insert_iterator