[RFC/Patch] What about using seekoff(-1, ...) for unbuffered underflow?

Paolo Carlini pcarlini@unitus.it
Sat Jun 7 20:07:00 GMT 2003


Nathan Myers wrote:

>This strikes me as the best approach.  Essentially, with streambufs
>there's no such thing, really, as unbuffered, because sgetc implies 
>a one-character buffer.  So, when it's supposed to be unbuffered, 
>instead use a one-character buffer.  (This relates to users calling
>setbuf with a one-character buffer being, properly, equivalent to 
>running unbuffered; the only difference is in who owns the buffer.)
>  
>
Thanks. I'm working on this and definitely at the irrelevant cost of one 
additional
char everything seems much cleaner.

Paolo.



More information about the Libstdc++ mailing list