We have got a problem... (Re: [RFC] Strive to prefer)
Paolo Carlini
pcarlini@suse.de
Thu Apr 22 22:20:00 GMT 2004
Pétur Runólfsson wrote:
> while (!_Traits::eq_int_type(__c, _Traits::eof()))
> {
> const size_t __n = __sbin->egptr() - __sbin->gptr();
> if (__n > 1)
> {
> const char_type* p = traits_type::find(__sbin->gptr(),
> __n, __delim);
> if (p)
> __n = p - __sbin->gptr();
> __str.append(__sbin->gptr(), __n);
> __sbin->gbump(__n);
>
>
Hi again Pétur.
istream::getline(char_type*, streamsize, char_type) is almost ready and
indeed, is very fast: in the corresponding test from 15002 we obtain the
same speed of stdio! Great! Thanks again: tomorrow will post the patch.
However, we have got a serious problem with getline(istream, string) (and
ws, operator>>(istream, string)): gptr() and egptr() are *protected*, sigh!
Can you see a way out? I can't, right now...
Paolo.
More information about the Libstdc++
mailing list