This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support stateful encodings in basic_filebuf


>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
>called).

Absolutely.

>> >	* 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
>obvious improvement.

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. 

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]