This is the mail archive of the mailing list for the libstdc++ 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: streambuf performance 200x

On Thu, Feb 13, 2003 at 03:36:27PM -0700, Martin Sebor wrote:
> Nathan Myers wrote:
> >My reading of D.7.* is that freezing the buffer does not cause 
> >sputc calls to fail in any case.  I think all the text describing
> >streambuf derivatives was composed carefully on the assumption
> >that sputc must be implementable as described above.
> What about D.7.1, p2, bullet 4:
>     frozen, set when the program has requested that the array object
>     not be altered, reallocated, or freed.
>     ^^^^^^^^^^^^^^
> Despite this, though, the Classic Iostream implementation on both
> HP-UX and SunOS allows frozen buffers to be altered via calls to
> sputc(). Is the text in D.7.1, p2 wrong or am I missing something?

"Don't call sputc, and it won't be altered."  :-)  If Per had really 
meant it, he might have specified that freeze should save off pnext, 
set pnext to point at pend, and undo that on unfreeze.  It would have 
been pointless to say that, though, when nobody does it.  Most likely 
it's a defect, and that bit should be deleted.  Anyhow it's in 
non-normative text.

Nathan Myers

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