-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
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
Broken support for printing abstract classes with ostream adapter #2439
Comments
Please provide a repro. |
Example:
Link: https://godbolt.org/z/KxzGEdhT7 GCC10 - Fails in ostream.h and format.h |
Could you submit a PR by any chance? |
Ok, I understand you mean pull request, probably I could... |
Fixed in ee0659f. With this change your example compiles (with a missing const added). Thanks for reporting. |
ENV: GCC 10 + FMT 8.0.1 (master) + FMT_COMPILE + fmt::format_to + reference to abstract class as argument.
Abstract class got friend operator <<.
Result: Compilation fails.
Issue looks to be caused by std::numeric_limits.
Fails with: limits:317:7: error: invalid abstract return type ‘'.
Workaround:
format.h (ignored is_fast_float for classes)
ostream.h (added & to std::declval to create reference to type instead of rvalue).
The text was updated successfully, but these errors were encountered: