From 7d2587cb32249cadde232fe2e98a73e281bf6b49 Mon Sep 17 00:00:00 2001 From: Michael Cuevas Date: Fri, 4 Oct 2024 13:00:11 -0700 Subject: [PATCH] fix ambiguous function call Summary: # This diff Qualifies format_to calls with `fmt::` so that the function call is no longer ambiguous # Context C++ 20 added std::format_to, which causes bare format_to calls to be ambiguous. We can easily fix the issue by qualifying the calls with `fmt::` as done in this diff. Reviewed By: narissiam Differential Revision: D63902777 fbshipit-source-id: ce4c9504f51c8822688829092ef709e7c9ee219b --- third-party/watchman/src/watchman/watchman_string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third-party/watchman/src/watchman/watchman_string.h b/third-party/watchman/src/watchman/watchman_string.h index 12a91e602fad7..0a653f39eed5f 100644 --- a/third-party/watchman/src/watchman/watchman_string.h +++ b/third-party/watchman/src/watchman/watchman_string.h @@ -559,7 +559,7 @@ struct formatter { template auto format(const w_string& s, FormatContext& ctx) const { - return format_to(ctx.out(), "{}", s.view()); + return fmt::format_to(ctx.out(), "{}", s.view()); } }; @@ -572,7 +572,7 @@ struct formatter { template auto format(const w_string_piece& s, FormatContext& ctx) const { - return format_to(ctx.out(), "{}", s.view()); + return fmt::format_to(ctx.out(), "{}", s.view()); } }; } // namespace fmt