mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Fix a couple of deprecated things.
This commit is contained in:
parent
018d8b57f6
commit
b588d7f35f
@ -115,7 +115,7 @@ template and implement ``parse`` and ``format`` methods::
|
|||||||
|
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const point &p, FormatContext &ctx) {
|
auto format(const point &p, FormatContext &ctx) {
|
||||||
return format_to(ctx.begin(), "({:.1f}, {:.1f})", p.x, p.y);
|
return format_to(ctx.out(), "({:.1f}, {:.1f})", p.x, p.y);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ Then you can pass objects of type ``point`` to any formatting function::
|
|||||||
In the example above the ``formatter<point>::parse`` function ignores the
|
In the example above the ``formatter<point>::parse`` function ignores the
|
||||||
contents of the format string referred to by ``ctx.begin()`` so the object will
|
contents of the format string referred to by ``ctx.begin()`` so the object will
|
||||||
always be formatted in the same way. See ``formatter<tm>::parse`` in
|
always be formatted in the same way. See ``formatter<tm>::parse`` in
|
||||||
:file:`fmt/time.h` for an advanced example of how to parse the format string and
|
:file:`fmt/chrono.h` for an advanced example of how to parse the format string and
|
||||||
customize the formatted output.
|
customize the formatted output.
|
||||||
|
|
||||||
You can also reuse existing formatters, for example::
|
You can also reuse existing formatters, for example::
|
||||||
|
Loading…
Reference in New Issue
Block a user