diff --git a/doc/api.rst b/doc/api.rst index 7b16b064..ca193bda 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -139,14 +139,16 @@ without implementing them yourself. For example:: template <> struct fmt::formatter: formatter { // parse is inherited from formatter. - auto format(color c, format_context& ctx) const; + auto format(color c, format_context& ctx) const + -> format_parse_context::iterator; }; // color.cc: #include "color.h" #include - auto fmt::formatter::format(color c, format_context& ctx) const { + auto fmt::formatter::format(color c, format_context& ctx) const + -> format_parse_context::iterator { string_view name = "unknown"; switch (c) { case color::red: name = "red"; break;