Skip to content

Commit d249fd9

Browse files
authored
Workaround for gcc 6 (#3810)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
1 parent 73d9135 commit d249fd9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/api.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ For example::
179179
struct fmt::formatter<point> : nested_formatter<double> {
180180
auto format(point p, format_context& ctx) const {
181181
return write_padded(ctx, [=](auto out) {
182-
return format_to(out, "({}, {})", nested(p.x), nested(p.y));
182+
return format_to(out, "({}, {})", this->nested(p.x),
183+
this->nested(p.y));
183184
});
184185
}
185186
};

test/format-test.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,8 @@ FMT_BEGIN_NAMESPACE
17651765
template <> struct formatter<point> : nested_formatter<double> {
17661766
auto format(point p, format_context& ctx) const -> decltype(ctx.out()) {
17671767
return write_padded(ctx, [this, p](auto out) -> decltype(out) {
1768-
return fmt::format_to(out, "({}, {})", nested(p.x), nested(p.y));
1768+
return fmt::format_to(out, "({}, {})", this->nested(p.x),
1769+
this->nested(p.y));
17691770
});
17701771
}
17711772
};

0 commit comments

Comments
 (0)