This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Basic_streambuf::setg() and setp() (2nd take)
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 7 May 2003 23:39:52 -0500
- Subject: Re: [Patch] Basic_streambuf::setg() and setp() (2nd take)
- References: <3EB9D8B0.2090505@unitus.it>
>Ok?
Yes, this is ok but you need to do sstream and stringbuf::setbuf as well.
Also,
+ if (!(this->_M_mode & ios_base::in))
+ this->_M_mode = this->_M_mode | ios_base::in;
+ if (!(this->_M_mode & ios_base::out))
+ this->_M_mode = this->_M_mode | ios_base::out;
can probably just be
+ // So that the replacement buffer can actually be used.
+ this->_M_mode =| ios_base::in;
+ this->_M_mode =| ios_base::out;
-benjamin