add explicit mt:: and std:: to avoid ambiguous call when both std::format_to and mt::format_to are present (#3259)

This commit is contained in:
LiAuTraver 2024-11-18 22:41:27 +08:00 committed by GitHub
parent 51a0deca2c
commit 1245bf8e8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -303,7 +303,7 @@ struct fmt::formatter<my_type> : fmt::formatter<std::string>
{
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);
}
};

View File

@ -281,7 +281,7 @@ struct fmt::formatter<my_type> : fmt::formatter<std::string> {
template <>
struct std::formatter<my_type> : std::formatter<std::string> {
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