------- Comment #4 from sebor at roguewave dot com 2009-02-12 16:49 ------- (In reply to comment #0)
I'm not sure I understand your rationale or I agree that this is a bug. IIUC, string(1, CHAR_MAX) indicates that groups may be of arbitrary length, which includes "123,456" This behavior is the same regardless of whether char is a signed or unsigned type. As a data point WRT existing practice: all implementations I've tried (Apache stdcxx on HP-UX/IPF, HP aCC 6.16, Sun C++ 5.9 with both libCstd and STLport, and IBM XLC++ 9.1) behave the same as libstdc++: they extract 123456 from the stream and set eofbit. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39168