This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: basic_stringbuf<>::sync
- To: libstdc++@sourceware.cygnus.com
- Subject: Re: basic_stringbuf<>::sync
- From: Benjamin Kosnik <bkoz@cygnus.com>
- Date: Fri, 28 May 1999 11:11:50 -0700 (PDT)
Ryszard,
Is there any way you could come up with a test case that demonstrates this
problem and is a suitable addition to one of the string tests?
-Benjamin
On Fri, 28 May 1999, Ryszard Kabatek wrote:
> There is a little mistake in my previous posting in the sync function, sorry!
> Since the most of the readers are currently sleeping I have the time
> to modify my mistake.
>
> virtual int
> sync()
> {
> char_type* __first = const_cast<char_type*>(_M_str.data());
> char_type* __last = const_cast<char_type*>(_M_str.data() +
> _M_str.size());
>
> if (_M_mode & ios_base::in)
> setg(__first, __first, __last);
> if (_M_mode & ios_base::out)
> setp(__first, __last);
> return 0;
> }