PR libstdc++/15002 (continued)
authorPaolo Carlini <pcarlini@suse.de>
Sat, 24 Apr 2004 22:20:31 +0000 (22:20 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 24 Apr 2004 22:20:31 +0000 (22:20 +0000)
commit062bf895938ee3130690ac20a8b571f6d61e7dc1
treeb23fae76c72b1ce16a8979ccd6b959c438a9649c
parent6f0b1fa57ee7bea87c2808546b342452825bad06
PR libstdc++/15002 (continued)

2004-04-24  Paolo Carlini  <pcarlini@suse.de>
    Petur Runolfsson  <peturr02@ru.is>

PR libstdc++/15002 (continued)
* include/bits/istream.tcc (basic_istream<>::getline(char_type*,
streamsize, char_type)): Use traits::find/copy in a loop to speed
up greatly the function in the common case (I/O buffer size >> 1).

2004-04-24  Paolo Carlini  <pcarlini@suse.de>

* testsuite/27_io/basic_istream/getline/char/4.cc: New.

* include/bits/istream.tcc (getline(basic_istream<>&,
basic_string<>&, _CharT)): Change to use sgetc()/snextc() instead
of sbumpc(), consistently with the other functions, thus also
dealing correctly with the case of exceeded string::max_size().

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>
From-SVN: r81146
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/istream.tcc
libstdc++-v3/testsuite/27_io/basic_istream/getline/char/4.cc [new file with mode: 0644]