fmtlib: updated to 10.2.1
10.2.1 - 2024-01-03 - Fixed ABI compatibility with earlier 10.x versions 10.2.0 - 2024-01-01 - Added support for the `%j` specifier (the number of days) for `std::chrono::duration` - Added support for the chrono suffix for days and changed the suffix for minutes from "m" to the correct "min" For example ([godbolt](https://godbolt.org/z/9KhMnq9ba)): ```c++ #include <fmt/chrono.h> int main() { fmt::print("{}\n", std::chrono::days(42)); // prints "42d" } ``` - Fixed an overflow in `std::chrono::time_point` formatting with large dates - Added a formatter for `std::source_location` For example ([godbolt](https://godbolt.org/z/YajfKjhhr)): ```c++ #include <source_location> #include <fmt/std.h> int main() { fmt::print("{}\n", std::source_location::current()); } ``` prints ``` /app/example.cpp:5:51: int main() ``` - Added a formatter for `std::bitset` ```c++ #include <bitset> #include <fmt/std.h> int main() { fmt::print("{}\n", std::bitset<6>(42)); // prints "101010" } ``` - Added an experimental `nested_formatter` that provides an easy way of applying a formatter to one or more subobjects while automatically handling width, fill and alignment. For example: ```c++ #include <fmt/format.h> struct point { double x, y; }; template <> struct fmt::formatter<point> : nested_formatter<double> { auto format(point p, format_context& ctx) const { return write_padded(ctx, [=](auto out) { return format_to(out, "({}, {})", nested(p.x), nested(p.y)); }); } }; int main() { fmt::print("[{:>20.2f}]", point{1, 2}); } ``` prints ``` [ (1.00, 2.00)] ``` - Added the generic representation (`g`) to `std::filesystem::path` ```c++ #include <filesystem> #include <fmt/std.h> int main() { fmt::print("{:g}\n", std::filesystem::path("C:\\foo")); } ``` prints `"C:/foo"` on Windows. - Made `format_as` work with references - Fixed formatting of invalid UTF-8 with precision - Fixed an inconsistency between `fmt::to_string` and `fmt::format` - Disallowed unsafe uses of `fmt::styled` ```c++ auto s = fmt::styled(std::string("dangle"), fmt::emphasis::bold); fmt::print("{}\n", s); // compile error ``` Pass `fmt::styled(...)` as a parameter instead. - Added a null check when formatting a C string with the `s` specifier - Disallowed the `c` specifier for `bool` - Made the default formatting unlocalized in `fmt::ostream_formatter` for consistency with the rest of the library - Fixed localized formatting in bases other than decimal - Fixed a performance regression in experimental `fmt::ostream::print` - Added synchronization with the underlying output stream when writing to the Windows console - Changed to only export `format_error` when {fmt} is built as a shared library - Made `fmt::streamed` `constexpr`. - Enabled `consteval` on older versions of MSVC - Added an option to build without `wchar_t` support on Windows - Improved build and CI configuration - Fixed various warnings, compilation and test issues - Improved documentation and README - Updated CI dependencies
This commit is contained in:
parent
000eb9c9e1
commit
461173d81a
|
@ -1,6 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.16 2023/08/29 07:08:09 adam Exp $
|
||||
# $NetBSD: Makefile,v 1.17 2024/01/04 18:42:57 adam Exp $
|
||||
|
||||
DISTNAME= fmt-10.1.1
|
||||
DISTNAME= fmt-10.2.1
|
||||
PKGNAME= ${DISTNAME:S/fmt/fmtlib/}
|
||||
CATEGORIES= textproc
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=fmtlib/}
|
||||
|
@ -11,7 +11,8 @@ HOMEPAGE= https://fmt.dev/
|
|||
COMMENT= Formatting library
|
||||
LICENSE= mit
|
||||
|
||||
USE_LANGUAGES= c c++11
|
||||
USE_CXX_FEATURES= c++11
|
||||
USE_LANGUAGES= c c++
|
||||
PKGCONFIG_OVERRIDE= support/cmake/fmt.pc.in
|
||||
TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR}
|
||||
# For Darwin
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.10 2023/08/29 07:08:09 adam Exp $
|
||||
@comment $NetBSD: PLIST,v 1.11 2024/01/04 18:42:57 adam Exp $
|
||||
include/fmt/args.h
|
||||
include/fmt/chrono.h
|
||||
include/fmt/color.h
|
||||
|
@ -17,6 +17,6 @@ lib/cmake/fmt/fmt-config.cmake
|
|||
lib/cmake/fmt/fmt-targets-release.cmake
|
||||
lib/cmake/fmt/fmt-targets.cmake
|
||||
lib/libfmt.so
|
||||
lib/libfmt.so.${PKGVERSION}
|
||||
lib/libfmt.so.10
|
||||
lib/libfmt.so.10.1.0
|
||||
lib/pkgconfig/fmt.pc
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
$NetBSD: distinfo,v 1.18 2023/08/29 07:08:09 adam Exp $
|
||||
$NetBSD: distinfo,v 1.19 2024/01/04 18:42:57 adam Exp $
|
||||
|
||||
BLAKE2s (fmt-10.1.1.tar.gz) = 0e5d93144689e4b56a664fbcc25107900b1b490e7bcdadf6197e4ecb3cc8e998
|
||||
SHA512 (fmt-10.1.1.tar.gz) = 288c349baac5f96f527d5b1bed0fa5f031aa509b4526560c684281388e91909a280c3262a2474d963b5d1bf7064b1c9930c6677fe54a0d8f86982d063296a54c
|
||||
Size (fmt-10.1.1.tar.gz) = 851454 bytes
|
||||
BLAKE2s (fmt-10.2.1.tar.gz) = 41991f39f59619e216b5244caa2e4cac73686de95bc809be9e7a919744229ba9
|
||||
SHA512 (fmt-10.2.1.tar.gz) = 27df90c681ec37e55625062a79e3b83589b6d7e94eff37a3b412bb8c1473f757a8adb727603acc9185c3490628269216843b7d7bd5a3cb37f0029da5d1495ffa
|
||||
Size (fmt-10.2.1.tar.gz) = 854665 bytes
|
||||
|
|
Loading…
Reference in New Issue