This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
RE: [RFC] A stream buffer for wcin
- From: Pétur Runólfsson <peturr02 at ru dot is>
- To: "Nathan Myers" <ncm-nospam at cantrip dot org>,<libstdc++ at gcc dot gnu dot org>
- Date: Tue, 18 Feb 2003 11:10:12 -0000
- Subject: 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