libstdc++/2302
bkoz@gcc.gnu.org
bkoz@gcc.gnu.org
Fri May 25 11:56:00 GMT 2001
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<std::ctype<char> >(getloc()).toupper(c);
if (putchar(c) == EOF)
return traits_type::eof();
#else
char cc = static_cast<char>(c);
cc = std::use_facet<std::ctype<char> >(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
More information about the Gcc-prs
mailing list