diff --git a/docs/blog/posts/2.2.0-released.md b/docs/blog/posts/2.2.0-released.md index 02e23690..f2736952 100644 --- a/docs/blog/posts/2.2.0-released.md +++ b/docs/blog/posts/2.2.0-released.md @@ -242,9 +242,9 @@ quantity q = (90. * km / h).in(mph); std::cout << "Number: " << q.numerical_value_in(mph) << "\n"; std::cout << "Unit: " << q.unit << "\n"; std::cout << "Dimension: " << q.dimension << "\n"; -std::println("{:{%N:.2f}%?%U}", q); +std::println("{::N[.2f]}", q); std::println("{:.4f} in {} of {}", q.numerical_value_in(mph), q.unit, q.dimension); -std::println("{:{%N:.4f} in %U of %D}", q); +std::println("{:%N in %U of %D:N[.4f]}", q); ``` ```text diff --git a/docs/users_guide/framework_basics/the_affine_space.md b/docs/users_guide/framework_basics/the_affine_space.md index e04f3eb3..768a22a7 100644 --- a/docs/users_guide/framework_basics/the_affine_space.md +++ b/docs/users_guide/framework_basics/the_affine_space.md @@ -491,7 +491,7 @@ room_temp room_ref{}; room_temp room_low = room_ref - number_of_steps * step_delta; room_temp room_high = room_ref + number_of_steps * step_delta; -std::println("Room reference temperature: {} ({}, {:{%N:.2f}%?%U})\n", +std::println("Room reference temperature: {} ({}, {::N[.2f]})\n", room_ref.quantity_from_zero(), room_ref.in(usc::degree_Fahrenheit).quantity_from_zero(), room_ref.in(si::kelvin).quantity_from_zero()); diff --git a/test/runtime/fmt_test.cpp b/test/runtime/fmt_test.cpp index 5d91e6b6..c7603238 100644 --- a/test/runtime/fmt_test.cpp +++ b/test/runtime/fmt_test.cpp @@ -1006,7 +1006,7 @@ TEST_CASE("localization with the 'L' specifier", "[text][fmt][localization]") std::locale grp2{std::locale::classic(), new group2}; std::locale grp3{std::locale::classic(), new group3}; - SECTION("full format {:{%N:L}%?%U} on a quantity") + SECTION("full format on a quantity") { SECTION("default spec") {