From 2e6bb706bf50bdc9af3cfed3c05f1efa32e3af5b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 29 Dec 2023 15:48:09 -0800 Subject: [PATCH] Update changelog --- ChangeLog.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 04a01a50..913a2fd6 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -60,6 +60,37 @@ Thanks @muggenhor. +- Added an experimental `nested_formatter` that provides an easy way 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` (https://github.com/fmtlib/fmt/issues/3715, https://github.com/fmtlib/fmt/pull/3729). For example: @@ -136,9 +167,11 @@ https://github.com/fmtlib/fmt/pull/3636). Thanks @glebm. - Improved build and CI configuration - (https://github.com/fmtlib/fmt/issues/3701, + (https://github.com/fmtlib/fmt/pull/3679, + https://github.com/fmtlib/fmt/issues/3701, https://github.com/fmtlib/fmt/pull/3702, - https://github.com/fmtlib/fmt/pull/3749). Thanks @pklima and @tchaikov. + https://github.com/fmtlib/fmt/pull/3749). + Thanks @jcar87, @pklima and @tchaikov. - Fixed various warnings, compilation and test issues (https://github.com/fmtlib/fmt/issues/3607,