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


Nice work. Two small comments:

>1) Call codecvt::unshift() from close(), seekoff and seekpos iff
>   _M_writing is true. Note that this is not what the standard says,
>   but it has the benefit that the written file can actually be read
>   again.

This is the only part of the patch that I'm a bit uneasy about, and thus
by extension:

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

If possible, we really need written documentation for this kind
functionality at some point (the same can be said about other large
parts of the library, however....)

best,
benjamin


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