From 1245bf8e8a19d914271df03124da9593f3634a9c Mon Sep 17 00:00:00 2001 From: LiAuTraver Date: Mon, 18 Nov 2024 22:41:27 +0800 Subject: [PATCH] add explicit mt:: and std:: to avoid ambiguous call when both std::format_to and mt::format_to are present (#3259) --- README.md | 2 +- example/example.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c45d7a0a..1aab857b 100644 --- a/README.md +++ b/README.md @@ -303,7 +303,7 @@ struct fmt::formatter : fmt::formatter { auto format(my_type my, format_context &ctx) const -> decltype(ctx.out()) { - return format_to(ctx.out(), "[my_type i={}]", my.i); + return fmt::format_to(ctx.out(), "[my_type i={}]", my.i); } }; diff --git a/example/example.cpp b/example/example.cpp index a2daf372..26b92a15 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -281,7 +281,7 @@ struct fmt::formatter : fmt::formatter { template <> struct std::formatter : std::formatter { auto format(my_type my, format_context &ctx) const -> decltype(ctx.out()) { - return format_to(ctx.out(), "[my_type i={}]", my.i); + return std::format_to(ctx.out(), "[my_type i={}]", my.i); } }; #endif