Skip to content

Commit

Permalink
Fix invalid fmt::formatter<>::format return type (fmtlib#3895)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <[email protected]>
  • Loading branch information
phprus authored and happymonkey1 committed Apr 6, 2024
1 parent 375d50a commit 35f055f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ without implementing them yourself. For example::
// parse is inherited from formatter<string_view>.

auto format(color c, format_context& ctx) const
-> format_parse_context::iterator;
-> format_context::iterator;
};

// color.cc:
#include "color.h"
#include <fmt/format.h>

auto fmt::formatter<color>::format(color c, format_context& ctx) const
-> format_parse_context::iterator {
-> format_context::iterator {
string_view name = "unknown";
switch (c) {
case color::red: name = "red"; break;
Expand Down

0 comments on commit 35f055f

Please sign in to comment.