diff --git a/dev/_sources/api.rst.txt b/dev/_sources/api.rst.txt index 7b16b064..ca193bda 100644 --- a/dev/_sources/api.rst.txt +++ b/dev/_sources/api.rst.txt @@ -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; diff --git a/dev/api.html b/dev/api.html index f47f5088..df9a1175 100644 --- a/dev/api.html +++ b/dev/api.html @@ -340,14 +340,16 @@

Compile-Time Format String Checkstemplate <> struct fmt::formatter<color>: formatter<string_view> { // parse is inherited from formatter<string_view>. - 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 <fmt/format.h> -auto fmt::formatter<color>::format(color c, format_context& ctx) const { +auto fmt::formatter<color>::format(color c, format_context& ctx) const + -> format_parse_context::iterator { string_view name = "unknown"; switch (c) { case color::red: name = "red"; break;