stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: [PATCH] STDCXX-515
Date Mon, 20 Aug 2007 13:51:01 GMT
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Tuesday, August 14, 2007 6:47 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: [PATCH] STDCXX-515
> 
> Farid Zaripov wrote:
> >   Below is the patch for fix STDCXX-515.
> > 
> >   ChangeLog:
> >   * sstream.cc (xsputn): Correct write position after growing the 
> > buffer.
> 
> Why do we need to do it in xsputn()? Isn't str() supposed to keep
> pptr() at the right offset after growing the buffer?

  No.

-----------------
27.7.1.2 Member functions [stringbuf.members]

void str(const basic_string<charT,traits,Allocator>& s );

2 Effects: Copies the content of s into the basic_stringbuf underlying
character sequence. If mode & ios_-
base::out is true, initializes the output sequence such that pbase()
points to the first underlying character,
epptr() points one past the last underlying character, and pptr() is
equal to epptr() if mode &ios_base::in
is true, otherwise pptr() is equal to pbase().
-----------------

Farid.

Mime
View raw message