Namespace-qualify format_to to avoid conflict with std::format_to

This commit is contained in:
Victor Zverovich 2022-05-15 09:51:20 -07:00
parent f6f920a1a8
commit 5ab9d39253

View File

@ -227,8 +227,8 @@ template and implement ``parse`` and ``format`` methods::
auto format(const point& p, FormatContext& ctx) const -> decltype(ctx.out()) {
// ctx.out() is an output iterator to write to.
return presentation == 'f'
? format_to(ctx.out(), "({:.1f}, {:.1f})", p.x, p.y)
: format_to(ctx.out(), "({:.1e}, {:.1e})", p.x, p.y);
? fmt::format_to(ctx.out(), "({:.1f}, {:.1f})", p.x, p.y)
: fmt::format_to(ctx.out(), "({:.1e}, {:.1e})", p.x, p.y);
}
};