Update docs

This commit is contained in:
Victor Zverovich 2022-09-16 15:27:18 -07:00
parent ac85afaab6
commit afcf424294

View File

@ -94,7 +94,7 @@ types.
To make a user-defined type formattable, specialize the ``formatter<T>`` struct To make a user-defined type formattable, specialize the ``formatter<T>`` struct
template and implement ``parse`` and ``format`` methods:: template and implement ``parse`` and ``format`` methods::
#include <fmt/format.h> #include <fmt/core.h>
struct point { struct point {
double x, y; double x, y;
@ -126,7 +126,7 @@ template and implement ``parse`` and ``format`` methods::
if (it != end && (*it == 'f' || *it == 'e')) presentation = *it++; if (it != end && (*it == 'f' || *it == 'e')) presentation = *it++;
// Check if reached the end of the range: // Check if reached the end of the range:
if (it != end && *it != '}') throw format_error("invalid format"); if (it != end && *it != '}') ctx.on_error("invalid format");
// Return an iterator past the end of the parsed range: // Return an iterator past the end of the parsed range:
return it; return it;