From 2a2048a7855fc2063e574eee54bca00eaf03c534 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 15 Jun 2024 09:26:49 -0700 Subject: [PATCH] Don't pass seconds as a double in examples --- include/fmt/base.h | 2 +- include/fmt/format.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 0e9758b7..c94b8c6d 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -2024,7 +2024,7 @@ constexpr auto make_format_args(T&... args) * * **Example**: * - * fmt::print("Elapsed time: {s:.2f} seconds", fmt::arg("s", 1.23)); + * fmt::print("The answer is {answer}.", fmt::arg("answer", 42)); */ template inline auto arg(const Char* name, const T& arg) -> detail::named_arg { diff --git a/include/fmt/format.h b/include/fmt/format.h index 38ea6219..e59477f9 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4321,7 +4321,7 @@ inline namespace literals { * **Example**: * * using namespace fmt::literals; - * fmt::print("Elapsed time: {s:.2f} seconds", "s"_a=1.23); + * fmt::print("The answer is {answer}.", "answer"_a=42); */ # if FMT_USE_NONTYPE_TEMPLATE_ARGS template constexpr auto operator""_a() {