We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nested_formatter
Using GCC 6.4.0 the API reference example
#include <fmt/format.h> struct point { double x, y; }; template <> struct fmt::formatter<point> : nested_formatter<double> { auto format(point p, format_context& ctx) const { return write_padded(ctx, [=](auto out) { return format_to(out, "({}, {})", nested(p.x), nested(p.y)); }); } }; int main() { fmt::print("[{:>20.2f}]", point{1, 2}); }
and the corresponding unit test produce compilation errors such as
error: cannot call member function 'fmt::v10::nested_view<T> fmt::v10::nested_formatter<T>::nested(const T&) const [with T = double]' without object return format_to(out, "({}, {})", nested(p.x), nested(p.y));
Reproducer: https://godbolt.org/z/6WoeMcs6a
The text was updated successfully, but these errors were encountered:
Fix: #3810
Sorry, something went wrong.
No branches or pull requests
Using GCC 6.4.0 the API reference example
and the corresponding unit test produce compilation errors such as
Reproducer: https://godbolt.org/z/6WoeMcs6a
The text was updated successfully, but these errors were encountered: