Fix error C2668 on Windows with option /std:c++latest (#3680)

* Namespace-qualify to avoid ambiguity with std::format_to for format-test.cc

When build fmt with MSVC under option /std:c++latest, it failed due to `error 2668: 'std::format_to': ambiguous call to overloaded function`, so add namespace to qualify the call to format_to to avoid this issue.
This commit is contained in:
June Liu 2023-10-17 00:54:02 +08:00 committed by GitHub
parent d9063baf22
commit 2ac6c5ca8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1788,7 +1788,7 @@ FMT_BEGIN_NAMESPACE
template <> struct formatter<point> : nested_formatter<double> {
auto format(point p, format_context& ctx) const -> decltype(ctx.out()) {
return write_padded(ctx, [this, p](auto out) -> decltype(out) {
return format_to(out, "({}, {})", nested(p.x), nested(p.y));
return fmt::format_to(out, "({}, {})", nested(p.x), nested(p.y));
});
}
};