Mention compile-time formatting

This commit is contained in:
Victor Zverovich
2024-12-26 09:48:10 -08:00
parent 11742a09c7
commit 853df39d0a

View File

@@ -551,12 +551,12 @@ This is a known limitation of "perfect" forwarding in C++.
<a id="compile-api"></a> <a id="compile-api"></a>
## Format String Compilation ## Format String Compilation
`fmt/compile.h` provides format string compilation enabled via the `fmt/compile.h` provides format string compilation and compile-time
`FMT_COMPILE` macro or the `_cf` user-defined literal defined in (`constexpr`) formatting enabled via the `FMT_COMPILE` macro or the `_cf`
namespace `fmt::literals`. Format strings marked with `FMT_COMPILE` user-defined literal defined in namespace `fmt::literals`. Format strings
or `_cf` are parsed, checked and converted into efficient formatting marked with `FMT_COMPILE` or `_cf` are parsed, checked and converted into
code at compile-time. This supports arguments of built-in and string efficient formatting code at compile-time. This supports arguments of built-in
types as well as user-defined types with `format` functions taking and string types as well as user-defined types with `format` functions taking
the format context type as a template parameter in their `formatter` the format context type as a template parameter in their `formatter`
specializations. For example: specializations. For example: