From afe8267f9f6f38643915f3be741af9196fe7ed9f Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Fri, 22 Feb 2019 18:38:33 +0100 Subject: [PATCH] Documentation/api.rst: Use same template argument order as in the prototype The formatter prototype is // A formatter for objects of type T. template struct formatter { explicit formatter(internal::dummy_formatter_arg); }; so we should use this order in the example as well. In addition we use Char instead of plain char to not confuse the reader as this name is totally arbitrary. --- doc/api.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index c6665daa..ab918cc4 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -165,8 +165,8 @@ You can also write a formatter for a hierarchy of classes:: virtual std::string name() const { return "B"; } }; - template - struct fmt::formatter::value, char>> : + template + struct fmt::formatter::value>> : fmt::formatter { template auto format(const A& a, FormatCtx& ctx) {