From mboxrd@z Thu Jan 1 00:00:00 1970 From: bkoz@gcc.gnu.org To: bkoz@gcc.gnu.org, david@hedbor.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, grendel@caudium.net, nobody@gcc.gnu.org Subject: Re: libstdc++/4083: input stream with field width() set reads too much to std::string Date: Fri, 24 Aug 2001 12:07:00 -0000 Message-id: <20010824190753.29211.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00636.html List-Id: Synopsis: input stream with field width() set reads too much to std::string Responsible-Changed-From-To: unassigned->bkoz Responsible-Changed-By: bkoz Responsible-Changed-When: Fri Aug 24 12:07:52 2001 Responsible-Changed-Why: Mine. State-Changed-From-To: open->feedback State-Changed-By: bkoz State-Changed-When: Fri Aug 24 12:07:52 2001 State-Changed-Why: This is not a bug. Both istream operators are working as expected: - 21.3.7.9 says that if is.width() is greater than 0, maximum number of appended chars is is.width, with characters extracted and appended until n characters are stored - 27.6.1.2.3 says that if is.width() is greater than 0, maximum number of appended chars is is.width, with characters extracted and appended until n-1 characters are stored Okay? http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4083&database=gcc