4.0.0
版本发布时间: 2017-06-28 01:06:02
fmtlib/fmt最新发布版本:11.0.2(2024-07-20 22:32:04)
-
Removed old compatibility headers
cppformat/*.h
and CMake options (#527). Thanks @maddinat0r (Alex Martin). -
Added
string.h
containingfmt::to_string()
as alternative tostd::to_string()
as well as other string writer functionality (#326 and #441):#include "fmt/string.h" std::string answer = fmt::to_string(42);
Thanks to @glebov-andrey (Andrey Glebov).
-
Moved
fmt::printf()
to newprintf.h
header and allowed%s
as generic specifier (#453), made%.f
more conformant to regularprintf()
(#490), added custom writer support (#476) and implemented missing custom argument formatting (#339 and #340):#include "fmt/printf.h" // %s format specifier can be used with any argument type. fmt::printf("%s", 42);
Thanks @mojoBrendan, @manylegged (Arthur Danskin) and @spacemoose (Glen Stark). See also #360, #335 and #331.
-
Added
container.h
containing aBasicContainerWriter
to write to containers likestd::vector
(#450). Thanks @polyvertex (Jean-Charles Lefebvre). -
Added
fmt::join()
function that takes a range and formats its elements separated by a given string (#466):#include "fmt/format.h" std::vector<double> v = {1.2, 3.4, 5.6}; // Prints "(+01.20, +03.40, +05.60)". fmt::print("({:+06.2f})", fmt::join(v.begin(), v.end(), ", "));
Thanks @olivier80.
-
Added support for custom formatting specifications to simplify customization of built-in formatting (#444). Thanks @polyvertex (Jean-Charles Lefebvre). See also #439.
-
Added
fmt::format_system_error()
for error code formatting (#323 and #526). Thanks @maddinat0r (Alex Martin). -
Added thread-safe
fmt::localtime()
andfmt::gmtime()
as replacement for the standard version totime.h
(#396). Thanks @codicodi. -
Internal improvements to
NamedArg
andArgLists
(#389 and #390). Thanks @chronoxor. -
Fixed crash due to bug in
FormatBuf
(#493). Thanks @effzeh. See also #480 and #491. -
Fixed handling of wide strings in
fmt::StringWriter
. -
Improved compiler error messages (#357).
-
Fixed various warnings and issues with various compilers (#494, #499, #483, #519, #485, #482, #475, #473 and #414). Thanks @chronoxor, @zhaohuaxishi, @pkestene (Pierre Kestener), @dschmidt (Dominik Schmidt) and @0x414c (Alexey Gorishny) .
-
Improved CMake: targets are now namespaced (#511 and #513), supported header-only
printf.h
(#354), fixed issue with minimal supported library subset (#418, #419 and #420). Thanks @bjoernthiel (Bjoern Thiel), @niosHD (Mario Werner), @LogicalKnight (Sean LK) and @alabuzhev (Alex Alabuzhev). -
Improved documentation. Thanks to @pwm1234 (Phil) for #393.
1、 fmt-4.0.0.zip 1.08MB