[RFC] A stream buffer for wcin
Pétur Runólfsson
peturr02@ru.is
Tue Feb 18 11:11:00 GMT 2003
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
More information about the Libstdc++
mailing list