diff --git a/doc/api.md b/doc/api.md index 03a1d77d..5b102771 100644 --- a/doc/api.md +++ b/doc/api.md @@ -269,18 +269,16 @@ that support C++20 `consteval`. On older compilers you can use the Unused arguments are allowed as in Python's `str.format` and ordinary functions. -::: basic_format_string +See [Type Erasure](#type-erasure) for an example of how to enable compile-time +checks in your own functions with `fmt::format_string` while avoiding template +bloat. + +::: fstring ::: format_string ::: runtime(string_view) -### Named Arguments - -::: arg(const Char*, const T&) - -Named arguments are not supported in compile-time checks at the moment. - ### Type Erasure You can create your own formatting function with compile-time checks and @@ -317,6 +315,12 @@ parameterized version. ::: basic_format_arg +### Named Arguments + +::: arg(const Char*, const T&) + +Named arguments are not supported in compile-time checks at the moment. + ### Compatibility ::: basic_string_view