This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Support stateful encodings in basic_filebuf
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Nov 2003 12:47:23 -0600
- Subject: Re: [PATCH] Support stateful encodings in basic_filebuf
- Organization: Red Hat / Chicago
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F55FA@mail.ru.is>
>I don't think the description in the standard about stateful encodings
>is meant to be read literally, it's a general description of what should
>be done (for example, it never says that pos_type::state() should be
>> > * testsuite/27_io/basic_filebuf/seekpos/char/1-io.cc,
>> > * testsuite/27_io/basic_filebuf/seekpos/char/1-out.cc:
>> > Check that sync does *not* set _M_writing to false.
>> I believe, however, that this still leaves ostream::flush with behavior
>> that is within the expected constraints.
>Note that previously, sync() only set _M_writing to false if there
>was something in the output buffer. Making it consistent seems an
Yep. I agree, it's cleaner.
I just had to carefully review the sync->flush bits, and how that
relates to what "C" was expecting for behavior, and I'm confident that
this is correct.