This is the mail archive of the libstdc++@gcc.gnu.org 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: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?


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.


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