From a141a5afe1176f2fa8bf7a7383223df55fdef623 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 11 Jan 2005 16:48:14 +0000 Subject: istream.cc (basic_istream::ignore(streamsize), [...]): Revert 2005-01-05 change... 2005-01-11 Paolo Carlini * src/istream.cc (basic_istream::ignore(streamsize), basic_istream::ignore(streamsize, int_type), basic_istream::ignore(streamsize), basic_istream::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 --- libstdc++-v3/src/istream.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'libstdc++-v3/src') 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(); -- cgit v1.1