[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2024-06-14 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28103 --- Comment #8 from Jonathan Wakely --- (In reply to Paolo Carlini from comment #2) > Basing on posts to the LWG reflector + private converstation, it seems > likely that the standard is moving to the behavior which is currently > implemented by

[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2024-06-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28103 --- Comment #5 from Jonathan Wakely --- For output, the requirement to set failbit was present since C++98, not added by a DR.

[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2024-06-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28103 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #3) > The requirement to set failbit came from > https://cplusplus.github.io/LWG/issue211 and certainly seems consistent with > other input operations, which set fa

[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2024-06-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28103 --- Comment #7 from Jonathan Wakely --- I think we can just do this in __ostream_insert: --- a/libstdc++-v3/include/bits/ostream_insert.h +++ b/libstdc++-v3/include/bits/ostream_insert.h @@ -103,6 +103,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION

[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2024-06-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28103 --- Comment #6 from Jonathan Wakely --- It looks like we've been setting badbit in ostream::_M_write(const charT*, streamsize) since it was added in r0-47606-g8d0a564bba54f7 That function was used to replace the similar code in basic_ostream::wr

[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2024-06-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28103 Jonathan Wakely changed: What|Removed |Added Status|SUSPENDED |NEW --- Comment #3 from Jonathan Wakel

[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2006-06-22 Thread pcarlini at suse dot de
--- Comment #2 from pcarlini at suse dot de 2006-06-22 16:10 --- Basing on posts to the LWG reflector + private converstation, it seems likely that the standard is moving to the behavior which is currently implemented by libstdc++, relatively to badbit vs failbit. Therefore, for now I'm

[Bug libstdc++/28103] std::operator<<(ostream&, string) sets badbit instead of failbit on failure

2006-06-20 Thread pcarlini at suse dot de
--- Comment #1 from pcarlini at suse dot de 2006-06-20 19:09 --- Thanks Martin. -- pcarlini at suse dot de changed: What|Removed |Added AssignedTo|unassigned at g