-
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
Anything changed around fmt::print(ostream&) ? #2936
Comments
8751a03 is the commit that changed the behavior. If you can find out why |
Minimal repro:
It gets here ok (ostream.h):
Then
so now it's So something is screwy. Also I'd suggest |
It's mostly a matter of adding a null check in Line 85 in 8e47cfd
|
How does that fix the actual problem, ie the code does not work? I want it to write the string to the file, not fail in a different way. |
It should fallback to writing to ostream (by returning |
Fixed in eaa8efb. Thanks for reporting. |
This code worked in 8.1.1, and works if I uncomment the lines to use ostream op<<() instead, but with trunk the fmt::print() gets an assert fail inside the CRT:
Call stack:
_fileno() asserts in format-inl.h because f==nullptr:
Any ideas? Clearly there's an easy workaround in this particular case, but would rather know why it's failing.
The text was updated successfully, but these errors were encountered: