You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes since R3:
Replaced _isatty(_fileno(stream)) with GetConsoleMode(_get_osfhandle(_fileno(stream)), ...) in a note in [format.functions] because the former may return 1 for streams not referring to a terminal.
What is the difference? Which one is more correct? Currently _isatty() is still used:
For the purposes of the paper GetConsoleMode is the right thing because _isatty may return true when there is no console in some cases (I don't remember exactly which though). Implementation-wise it shouldn't matter because in the worst case there is extra transcoding in those cases which is then discarded but that should be uncommon.
In the paper there is this note:
What is the difference? Which one is more correct? Currently
_isatty()
is still used:fmt/include/fmt/format-inl.h
Lines 1482 to 1498 in 81f1cc7
Related issue #2080. Is the fact that we return false when
WriteConsoleW()
fails good enough solution and there is no need forGetConsoleMode
?The text was updated successfully, but these errors were encountered: