mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Improve docs
This commit is contained in:
parent
6a5b4d5faf
commit
419ba86a91
@ -42,9 +42,9 @@ surrounded by braces ``{}``. The fields are replaced with formatted arguments
|
||||
in the resulting string. A function taking *fmt* doesn't participate in an
|
||||
overload resolution if the latter is not a string.
|
||||
|
||||
Most formatting functions such as ``fmt::format`` require a format string to
|
||||
Most formatting functions such as `fmt::format` require a format string to
|
||||
be known at compile time, i.e. be a string literal or a ``constexpr`` string.
|
||||
To pass a runtime format string wrap it in ``fmt::runtime``.
|
||||
To pass a runtime format string wrap it in `fmt::runtime`.
|
||||
|
||||
*args* is an argument list representing objects to be formatted.
|
||||
|
||||
@ -87,6 +87,8 @@ formatting is still possible using ``fmt::vformat``, ``fmt::vprint``, etc.
|
||||
|
||||
.. doxygentypedef:: fmt::format_string
|
||||
|
||||
.. doxygenfunction:: fmt::runtime(const S&)
|
||||
|
||||
Named Arguments
|
||||
---------------
|
||||
|
||||
|
@ -2956,7 +2956,7 @@ template <typename S> auto runtime(const S& s) -> basic_string_view<char_t<S>> {
|
||||
#else
|
||||
template <typename... Args>
|
||||
using format_string = basic_format_string<char, type_identity_t<Args>...>;
|
||||
// Creates a runtime format string.
|
||||
/** Creates a runtime format string. */
|
||||
template <typename S> auto runtime(const S& s) -> basic_runtime<char_t<S>> {
|
||||
return {{s}};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user