mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 02:37:36 +02:00
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:
@ -1788,7 +1788,7 @@ FMT_BEGIN_NAMESPACE
|
|||||||
template <> struct formatter<point> : nested_formatter<double> {
|
template <> struct formatter<point> : nested_formatter<double> {
|
||||||
auto format(point p, format_context& ctx) const -> decltype(ctx.out()) {
|
auto format(point p, format_context& ctx) const -> decltype(ctx.out()) {
|
||||||
return write_padded(ctx, [this, p](auto out) -> decltype(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));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user