mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Update the docs.
This commit is contained in:
parent
ca171307f3
commit
9aa5b7ecd4
10
README.rst
10
README.rst
@ -72,8 +72,8 @@ An object of any user-defined type for which there is an overloaded
|
|||||||
std::string s = str(fmt::Format("The date is {0}") << Date(2012, 12, 9));
|
std::string s = str(fmt::Format("The date is {0}") << Date(2012, 12, 9));
|
||||||
// s == "The date is 2012-12-9"
|
// s == "The date is 2012-12-9"
|
||||||
|
|
||||||
You can use `fmt::TempFormatter
|
You can use `fmt::Formatter
|
||||||
<http://zverovich.net/format/#project0classfmt_1_1_temp_formatter>`__
|
<http://zverovich.net/format/#project0classfmt_1_1_formatter>`__
|
||||||
to create your own functions similar to `fmt::Format
|
to create your own functions similar to `fmt::Format
|
||||||
<http://zverovich.net/format/#fmt::Format__StringRef>`__ and ``fmt::Print``
|
<http://zverovich.net/format/#fmt::Format__StringRef>`__ and ``fmt::Print``
|
||||||
with an arbitrary action performed when formatting is complete:
|
with an arbitrary action performed when formatting is complete:
|
||||||
@ -87,11 +87,11 @@ with an arbitrary action performed when formatting is complete:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Formats an error message and prints it to std::cerr.
|
// Formats an error message and prints it to std::cerr.
|
||||||
fmt::TempFormatter<PrintError> ReportError(const char *format) {
|
fmt::Formatter<PrintError> ReportError(const char *format) {
|
||||||
return fmt::TempFormatter<PrintError>(format);
|
return fmt::Formatter<PrintError>(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportError("File not found: {0}") << path;
|
ReportError("File not found: {}") << path;
|
||||||
|
|
||||||
Motivation
|
Motivation
|
||||||
----------
|
----------
|
||||||
|
@ -10,7 +10,7 @@ String Formatting API
|
|||||||
.. doxygenclass:: fmt::BasicFormatter
|
.. doxygenclass:: fmt::BasicFormatter
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. doxygenclass:: fmt::TempFormatter
|
.. doxygenclass:: fmt::Formatter
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. doxygenclass:: fmt::NoAction
|
.. doxygenclass:: fmt::NoAction
|
||||||
|
Loading…
Reference in New Issue
Block a user