9.1.0
版本发布时间: 2022-08-28 00:06:02
fmtlib/fmt最新发布版本:11.0.2(2024-07-20 22:32:04)
fmt::formatted_size
now works at compile time (#3026). For example (godbolt):
#include <fmt/compile.h>
int main() {
using namespace fmt::literals;
constexpr size_t n = fmt::formatted_size("{}"_cf, 42);
fmt::print("{}\n", n); // prints 2
}
Thanks @marksantaniello (Mark Santaniello).
Fixed handling of invalid UTF-8 (#3038, #3044, #3056). Thanks @phprus (Vladislav Shchapov) and @skeeto (Christopher Wellons).
Improved Unicode support in ostream
overloads of print
(#2994, #3001, #3025). Thanks @dimztimz (Dimitrij Mijoski).
Fixed handling of the sign specifier in localized formatting on systems with 32-bit wchar_t
(#3041).
Added support for wide streams to fmt::streamed
(#2994). Thanks @phprus (Vladislav Shchapov).
Added the n
specifier that disables the output of delimiters when formatting ranges (#2981, #2983). For example (godbolt):
#include <fmt/ranges.h>
#include <vector>
int main() {
auto v = std::vector{1, 2, 3};
fmt::print("{:n}\n", v); // prints 1, 2, 3
}
Thanks @BRevzin (Barry Revzin).
Worked around problematic std::string_view
constructors introduced in C++23 (#3030, #3050). Thanks @strega-nil-ms (nicole mazzuca).
Improve handling (exclusion) of recursive ranges (#2968, #2974). Thanks @Dani-Hub (Daniel Krügler).
Improved error reporting in format string compilation (#3055).
Improved the implementation of Dragonbox, the algorithm used for the default floating-point formatting (#2984). Thanks @jk-jeon (Junekey Jeon).
Fixed issues with floating-point formatting on exotic platforms.
Improved the implementation of chrono formatting (#3010). Thanks @phprus (Vladislav Shchapov).
Improved documentation (#2966, #3009, #3020, #3037). Thanks @mwinterb, @jcelerier (Jean-Michaël Celerier) and @remiburtin (Rémi Burtin).
Improved build configuration (#2991, #2995, #3004, #3007, #3040). Thanks @dimztimz (Dimitrij Mijoski) and @hwhsu1231 (Haowei Hsu).
Fixed various warnings and compilation issues (#2969, #2971, #2975, #2982, #2985, #2988, #3000, #3006, #3014, #3015, #3021, #3023, #3024, #3029, #3043, #3052, #3053, #3054). Thanks @h-friederich (Hannes Friederich), @dimztimz (Dimitrij Mijoski), @olupton (Olli Lupton), @bernhardmgruber (Bernhard Manfred Gruber), @phprus (Vladislav Shchapov).
Pull Requests
- Add xchar support for fmt::streamed(). by @phprus in https://github.com/fmtlib/fmt/pull/2961
- Fixed typo in changelog example by @mwinterb in https://github.com/fmtlib/fmt/pull/2966
- Exclude recursive ranges from the formatter specialization for ranges by @Dani-Hub in https://github.com/fmtlib/fmt/pull/2974
- Pointless comparison warnings by @federico-busato in https://github.com/fmtlib/fmt/pull/2971
- The n specifier for ranges. by @brevzin in https://github.com/fmtlib/fmt/pull/2981
- Fix for EDG frontend (Intel, NVHPC compilers) by @phprus in https://github.com/fmtlib/fmt/pull/2982
- Yet another simplification of Dragonbox by @jk-jeon in https://github.com/fmtlib/fmt/pull/2984
- Add additional search paths for doxygen on Windows by @hwhsu1231 in https://github.com/fmtlib/fmt/pull/2991
- Fixes IBM XLC behavior with uint128 fallback by @federico-busato in https://github.com/fmtlib/fmt/pull/2985
- Reduce filesize of the tests on MinGW by @dimztimz in https://github.com/fmtlib/fmt/pull/2995
- Improve Unicode handling when writing to an ostream on Windows by @dimztimz in https://github.com/fmtlib/fmt/pull/2994
- Add fmt:: namespace to doc by @jcelerier in https://github.com/fmtlib/fmt/pull/3009
- Range formatter by @brevzin in https://github.com/fmtlib/fmt/pull/2983
- Fix Unicode handling for ostream under Windows with libc++. by @dimztimz in https://github.com/fmtlib/fmt/pull/3001
- Improve CI on Windows, deprecate AppVeyor by @dimztimz in https://github.com/fmtlib/fmt/pull/3007
- Simplify and improve chrono formatting by @phprus in https://github.com/fmtlib/fmt/pull/3010
- Suppress unused typedef warning by @h-friederich in https://github.com/fmtlib/fmt/pull/3021
- Remove -Wl,--as-needed linker option by @phprus in https://github.com/fmtlib/fmt/pull/3024
- Use is_utf8() in print(std::ostream&, ...) by @dimztimz in https://github.com/fmtlib/fmt/pull/3025
- Constexpr formatted_size by @marksantaniello in https://github.com/fmtlib/fmt/pull/3026
- Fix testsuite on MinGW + MSVCRT by @dimztimz in https://github.com/fmtlib/fmt/pull/3029
- Fix docs by @remiburtin in https://github.com/fmtlib/fmt/pull/3037
- Prepare for deprecating FindPythonInterp module. by @hwhsu1231 in https://github.com/fmtlib/fmt/pull/3040
- nvhpc/22.3: workaround for c++17 mode by @olupton in https://github.com/fmtlib/fmt/pull/3043
- Fix decoder on broken utf8 sequences. by @phprus in https://github.com/fmtlib/fmt/pull/3044
- Disable non-type template args for nvhpc by @bernhardmgruber in https://github.com/fmtlib/fmt/pull/3053
- Disable bogus -Wstringop-overflow on GCC 11 by @phprus in https://github.com/fmtlib/fmt/pull/3054
- Fix bugs in utf8 decoder by @phprus in https://github.com/fmtlib/fmt/pull/3056
New Contributors
- @hwhsu1231 made their first contribution in https://github.com/fmtlib/fmt/pull/2991
- @dimztimz made their first contribution in https://github.com/fmtlib/fmt/pull/2995
- @h-friederich made their first contribution in https://github.com/fmtlib/fmt/pull/3021
- @marksantaniello made their first contribution in https://github.com/fmtlib/fmt/pull/3026
- @remiburtin made their first contribution in https://github.com/fmtlib/fmt/pull/3037
- @bernhardmgruber made their first contribution in https://github.com/fmtlib/fmt/pull/3053
Full Changelog: https://github.com/fmtlib/fmt/compare/9.0.0...9.1.0
1、 fmt-9.1.0.zip 1.2MB