diff --git a/README.rst b/README.rst index f30c5dae..7bb1d810 100644 --- a/README.rst +++ b/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 -`__ +You can use `fmt::Formatter +`__ to create your own functions similar to `fmt::Format `__ 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 ReportError(const char *format) { - return fmt::TempFormatter(format); + fmt::Formatter ReportError(const char *format) { + return fmt::Formatter(format); } - ReportError("File not found: {0}") << path; + ReportError("File not found: {}") << path; Motivation ---------- diff --git a/doc/index.rst b/doc/index.rst index e01306bd..2c51991a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -10,7 +10,7 @@ String Formatting API .. doxygenclass:: fmt::BasicFormatter :members: -.. doxygenclass:: fmt::TempFormatter +.. doxygenclass:: fmt::Formatter :members: .. doxygenclass:: fmt::NoAction