[Ptach] Remove the obsolete _M_underflow trick

Paolo Carlini pcarlini@unitus.it
Sat Jun 28 20:56:00 GMT 2003


Hi,

this all started with the following obsolete comment in std_fstream.h:

  // The only difference between underflow() and uflow() is that the
  // latter bumps _M_in_cur after the read.  In the sync_with_stdio
  // case, this is important, as we need to unget the read character in
  // the underflow() case in order to maintain synchronization.  So
  // instead of calling underflow() from uflow(), we create a common
  // subroutine to do the real work.

I wanted to just fix it but then I realized that we don't have anymore
any reason to use the machinery both in filebuf and in stringbuf (where,
my bad, I have blindly introduced it recently, in the rush for the
_M_out_lim removal work).

Thus the below, which basically has filebuf and stringbuf providing only
underflow, and uflow (defined in terms of underflow) provided by
streambuf. Seems a nice clean up.

Tested x86-linux.

Anyone objecting to it? Otherwise will commit, say, on monday

Paolo.

/////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_clean
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030628/85af1680/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_clean
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030628/85af1680/attachment-0001.ksh>


More information about the Libstdc++ mailing list