mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Update readme
This commit is contained in:
parent
1d4640415d
commit
eac25ad1c7
@ -101,7 +101,7 @@ which take arbitrary arguments:
|
|||||||
.. code-block:: c++
|
.. code-block:: c++
|
||||||
|
|
||||||
// Prints formatted error message.
|
// Prints formatted error message.
|
||||||
void report_error(const char *format, const fmt::ArgList &args) {
|
void report_error(const char *format, fmt::ArgList args) {
|
||||||
fmt::print("Error: ");
|
fmt::print("Error: ");
|
||||||
fmt::print(format, args);
|
fmt::print(format, args);
|
||||||
}
|
}
|
||||||
@ -109,10 +109,9 @@ which take arbitrary arguments:
|
|||||||
|
|
||||||
report_error("file not found: {}", path);
|
report_error("file not found: {}", path);
|
||||||
|
|
||||||
Note that you only need to define one function that takes ``const fmt::ArgList &``
|
Note that you only need to define one function that takes ``fmt::ArgList``
|
||||||
argument and ``FMT_VARIADIC`` automatically defines necessary wrappers that
|
argument. ``FMT_VARIADIC`` automatically defines necessary wrappers that
|
||||||
accept variable number of arguments. These wrappers are simple inline functions
|
accept variable number of arguments.
|
||||||
that are very fast and don't result in code bloat.
|
|
||||||
|
|
||||||
Projects using this library
|
Projects using this library
|
||||||
---------------------------
|
---------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user