diff options
author | Paolo Carlini <pcarlini@suse.de> | 2005-01-11 16:48:14 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2005-01-11 16:48:14 +0000 |
commit | a141a5afe1176f2fa8bf7a7383223df55fdef623 (patch) | |
tree | 1c942ddec4a4c9fb5c671be6f9e3451e07a07c8f /libstdc++-v3/src | |
parent | a969c1d23b142de977b07ce0d7a018fb4aab3893 (diff) | |
download | gcc-a141a5afe1176f2fa8bf7a7383223df55fdef623.zip gcc-a141a5afe1176f2fa8bf7a7383223df55fdef623.tar.gz gcc-a141a5afe1176f2fa8bf7a7383223df55fdef623.tar.bz2 |
istream.cc (basic_istream<char>::ignore(streamsize), [...]): Revert 2005-01-05 change...
2005-01-11 Paolo Carlini <pcarlini@suse.de>
* src/istream.cc (basic_istream<char>::ignore(streamsize),
basic_istream<char>::ignore(streamsize, int_type),
basic_istream<wchar_t>::ignore(streamsize),
basic_istream<wchar_t>::ignore(streamsize, int_type)): Revert
2005-01-05 change: actually, the previous behavior is conforming
and consistent with that of get(char_type*, streamsize, char_type),
albeit slightly different from that of 3.3/3.4 in a corner case
due to the use of snextc.
* include/bits/istream.tcc (ignore(streamsize), ignore(streamsize,
int_type)): Likewise.
* testsuite/27_io/basic_istream/ignore/char/4.cc: Remove.
* testsuite/27_io/basic_istream/ignore/wchar_t/4.cc: Likewise.
From-SVN: r93189
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/istream.cc | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libstdc++-v3/src/istream.cc b/libstdc++-v3/src/istream.cc index dc99051..e3a3649 100644 --- a/libstdc++-v3/src/istream.cc +++ b/libstdc++-v3/src/istream.cc @@ -152,7 +152,7 @@ namespace std break; } - if (_M_gcount < __n) + if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(...) @@ -217,11 +217,9 @@ namespace std break; } - if (_M_gcount == __n) - ; - else if (traits_type::eq_int_type(__c, __eof)) + if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; - else + else if (traits_type::eq_int_type(__c, __delim)) { ++_M_gcount; __sb->sbumpc(); @@ -432,7 +430,7 @@ namespace std break; } - if (_M_gcount < __n) + if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(...) @@ -497,11 +495,9 @@ namespace std break; } - if (_M_gcount == __n) - ; - else if (traits_type::eq_int_type(__c, __eof)) + if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; - else + else if (traits_type::eq_int_type(__c, __delim)) { ++_M_gcount; __sb->sbumpc(); |