mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 03:17:53 +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));
|
||||
// s == "The date is 2012-12-9"
|
||||
|
||||
You can use `fmt::TempFormatter
|
||||
<http://zverovich.net/format/#project0classfmt_1_1_temp_formatter>`__
|
||||
You can use `fmt::Formatter
|
||||
<http://zverovich.net/format/#project0classfmt_1_1_formatter>`__
|
||||
to create your own functions similar to `fmt::Format
|
||||
<http://zverovich.net/format/#fmt::Format__StringRef>`__ and ``fmt::Print``
|
||||
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.
|
||||
fmt::TempFormatter<PrintError> ReportError(const char *format) {
|
||||
return fmt::TempFormatter<PrintError>(format);
|
||||
fmt::Formatter<PrintError> ReportError(const char *format) {
|
||||
return fmt::Formatter<PrintError>(format);
|
||||
}
|
||||
|
||||
ReportError("File not found: {0}") << path;
|
||||
ReportError("File not found: {}") << path;
|
||||
|
||||
Motivation
|
||||
----------
|
||||
|
@ -10,7 +10,7 @@ String Formatting API
|
||||
.. doxygenclass:: fmt::BasicFormatter
|
||||
:members:
|
||||
|
||||
.. doxygenclass:: fmt::TempFormatter
|
||||
.. doxygenclass:: fmt::Formatter
|
||||
:members:
|
||||
|
||||
.. doxygenclass:: fmt::NoAction
|
||||
|
Loading…
Reference in New Issue
Block a user