This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFC] libstdc++/7220
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sat, 06 Jul 2002 19:45:42 +0200
- Subject: [RFC] libstdc++/7220
Hi,
the following testcase, distilled from the PR, passes with 3.0.4 (and
Dinkum), doesn't with 3.1 and current v3:
#include <sstream>
#include <cassert>
#define Is std::basic_istream<char,std::char_traits<char> >
#define It std::char_traits<char>
#define Al std::allocator<char>
int main(int, char *[])
{
int res = 0;
std::streamsize n;
std::basic_string<char,It,Al > input((const char *)"abcdefg\n");
std::basic_stringbuf<char,It,Al > sbuf(input);
std::basic_istream<char,It > istr(&sbuf);
istr.ignore(0, (Is::int_type)'a');
assert( istr.gcount() == 0 );
return 0;
}
In your reading of the standard (27.6.1.3, 24), how ignore is supposed
to behave in this case? When count == 0, and the next char is the
delimiter ('a'), must it be eaten anyway or not?
Ciao, Paolo.