From mboxrd@z Thu Jan 1 00:00:00 1970 From: bkoz@gcc.gnu.org To: bkoz@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/2302 Date: Fri, 25 May 2001 11:56:00 -0000 Message-id: <20010525185601.6281.qmail@sourceware.cygnus.com> X-SW-Source: 2001-05/msg00813.html List-Id: The following reply was made to PR libstdc++/2302; it has been noted by GNATS. From: bkoz@gcc.gnu.org To: bkoz@gcc.gnu.org, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, schmid@snake.iap.physik.tu-darmstadt.de Cc: Subject: Re: libstdc++/2302 Date: 25 May 2001 18:46:39 -0000 Synopsis: Problems with toupper Responsible-Changed-From-To: unassigned->bkoz Responsible-Changed-By: bkoz Responsible-Changed-When: Fri May 25 11:46:39 2001 Responsible-Changed-Why: Responsible. State-Changed-From-To: open->feedback State-Changed-By: bkoz State-Changed-When: Fri May 25 11:46:39 2001 State-Changed-Why: This is the same issue as libstdc++/1704. I don't think this is a bug: please read the detailed commentary in 1704 and let me know what you think. There were some errors in your code: here's the corrected version. Sorry it took me so long to get around to this. -benjamin Here: truct outbuf: public std::streambuf { virtual int_type overflow (int_type c) { if (c != traits_type::eof()) { // does not work at all (characters are discarded). // c = std::toupper(c, getloc()); // does work but does not convert. #if 0 std::use_facet >(getloc()).toupper(c); if (putchar(c) == EOF) return traits_type::eof(); #else char cc = static_cast(c); cc = std::use_facet >(getloc()).toupper(cc); if (putchar(cc) == EOF) return traits_type::eof(); #endif } return c; } }; http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2302&database=gcc