Skip to content

Commit

Permalink
fix ambiguous function call
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MichaelCuevas authored and facebook-github-bot committed Oct 4, 2024
1 parent 9436346 commit 7d2587c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions third-party/watchman/src/watchman/watchman_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ struct formatter<w_string> {

template <typename FormatContext>
auto format(const w_string& s, FormatContext& ctx) const {
return format_to(ctx.out(), "{}", s.view());
return fmt::format_to(ctx.out(), "{}", s.view());
}
};

Expand All @@ -572,7 +572,7 @@ struct formatter<w_string_piece> {

template <typename FormatContext>
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
Expand Down

0 comments on commit 7d2587c

Please sign in to comment.