mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-31 00:32:40 +00:00
Mention namespace fmt::literals
in the document (#4002)
This commit is contained in:
parent
0f6e716548
commit
fe741daaab
13
doc/api.md
13
doc/api.md
@ -533,12 +533,13 @@ feature](https://en.cppreference.com/w/cpp/feature_test).
|
|||||||
## Format String Compilation
|
## Format String Compilation
|
||||||
|
|
||||||
`fmt/compile.h` provides format string compilation enabled via the
|
`fmt/compile.h` provides format string compilation enabled via the
|
||||||
`FMT_COMPILE` macro or the `_cf` user-defined literal. Format strings
|
`FMT_COMPILE` macro or the `_cf` user-defined literal (defined in
|
||||||
marked with `FMT_COMPILE` or `_cf` are parsed, checked and converted
|
namespace `fmt::literals`). Format strings marked with `FMT_COMPILE`
|
||||||
into efficient formatting code at compile-time. This supports arguments
|
or `_cf` are parsed, checked and converted into efficient formatting
|
||||||
of built-in and string types as well as user-defined types with `format`
|
code at compile-time. This supports arguments of built-in and string
|
||||||
functions taking the format context type as a template parameter in
|
types as well as user-defined types with `format` functions taking
|
||||||
their `formatter` specializations. For example:
|
the format context type as a template parameter in their `formatter`
|
||||||
|
specializations. For example:
|
||||||
|
|
||||||
template <> struct fmt::formatter<point> {
|
template <> struct fmt::formatter<point> {
|
||||||
constexpr auto parse(format_parse_context& ctx);
|
constexpr auto parse(format_parse_context& ctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user