istream.tcc (ignore): Correctly deal with n == numeric_limits<streamsize>::max().
authorPaolo Carlini <pcarlini@suse.de>
Mon, 24 May 2004 09:40:56 +0000 (09:40 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 24 May 2004 09:40:56 +0000 (09:40 +0000)
commitb1c5b5a09b545dabdd4a10d67f31d93779af95db
tree79ba3633dbe2257f27c56750bac1f66555500dab
parent76391e5a045593f4cdc97535246ffafe2a5ecd72
istream.tcc (ignore): Correctly deal with n == numeric_limits<streamsize>::max().

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

* include/bits/istream.tcc (ignore): Correctly deal with
n == numeric_limits<streamsize>::max().
* testsuite/27_io/basic_istream/ignore/char/2.cc: New.

* include/bits/istream.tcc (basic_istream<>::getline): Prefer
'_M_gcount + 1 < __n' to '--__n; _M_gcount < __n', just in case
__n == numeric_limits<>::min().

* include/bits/istream.tcc: Minor tweaks.

* testsuite/21_strings/basic_string/inserters_extractors/char/10.cc:
Tighten.
* testsuite/21_strings/basic_string/inserters_extractors/char/11.cc:
Likewise.
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
Likewise.
* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
Likewise.
* testsuite/27_io/basic_istream/getline/char/5.cc: Likewise.

From-SVN: r82198
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/istream.tcc
libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/10.cc
libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/char/11.cc
libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc
libstdc++-v3/testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc
libstdc++-v3/testsuite/27_io/basic_istream/getline/char/5.cc
libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/2.cc [new file with mode: 0644]