[Bug libstdc++/91653] ostream::operator<<(streambuf*) should fail the ostream when write output stream error but not

yhliang86 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Wed Sep 11 04:18:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91653

--- Comment #4 from yinghui <yhliang86 at hotmail dot com> ---
(In reply to TC from comment #3)
> Looks NAD to me.
> 
> http://eel.is/c++draft/ostream.inserters#8.2 doesn't say that we set any bit
> in that case. Contrast with http://eel.is/c++draft/ostream.unformatted#3 and
> http://eel.is/c++draft/ostream.unformatted#5.2

so, seems like this is a bug of the c++ standard?
if an i/o function can't report failure on i/o operation failure, it can not be
used in any serious code.


More information about the Gcc-bugs mailing list