This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
We have got a problem... (Re: [RFC] Strive to prefer)
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Pétur Runólfsson <peturr02 at ru dot is>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 23 Apr 2004 00:19:14 +0200
- Subject: We have got a problem... (Re: [RFC] Strive to prefer)
- References: <07D05A69A3D0C14FAEA60C3ACE8E5564028F5633@mail.ru.is>
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.