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] A stream buffer for wcin


Nathan Myers wrote:
> Right.  You don't have to be fast if ios_base::sync_with_stdio(false) 
> hasn't been called.  But you should be if it has.  (And its effects
> are undefined if you've done any input before you call it.)  False
> *used* to be default.  Grrr.

Yes, sync_with_stdio is somewhat strange (the argument defaults to
true, but the standard only says what it does when the argument is
false :-)

> Or, you can derive wcinbuf from wfilebuf, and delegate to the 
> base class if ios_base::sync_with_stdio(false) gets called. 

Would it be better to add this to stdio_filebuf<wchar_t>? It does
seem generally useful, and I don't want to hardcode the use of
stdin anyway, as that would make this too hard to test.

Petur


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