--- - branch: MAIN date: Thu Jan 4 18:42:57 UTC 2024 files: - new: '1.17' old: '1.16' path: pkgsrc/textproc/fmtlib/Makefile pathrev: pkgsrc/textproc/fmtlib/Makefile@1.17 type: modified - new: '1.11' old: '1.10' path: pkgsrc/textproc/fmtlib/PLIST pathrev: pkgsrc/textproc/fmtlib/PLIST@1.11 type: modified - new: '1.19' old: '1.18' path: pkgsrc/textproc/fmtlib/distinfo pathrev: pkgsrc/textproc/fmtlib/distinfo@1.19 type: modified id: 20240104T184257Z.4951e534aa31a659a9cc8b1c990941881ed4ec99 log: | 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 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 #include 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 #include 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 struct point { double x, y; }; template <> struct fmt::formatter : nested_formatter { 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 #include 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 module: pkgsrc subject: 'CVS commit: pkgsrc/textproc/fmtlib' unixtime: '1704393777' user: adam