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]

We have got a problem... (Re: [RFC] Strive to prefer)


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.


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