This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11108] <iostream> causes transform() to not compile with tolower()
- From: "davidg at flash dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2003 16:14:31 -0000
- Subject: [Bug c++/11108] <iostream> causes transform() to not compile with tolower()
- References: <20030606070707.11108.davidg@flash.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11108
------- Additional Comments From davidg@flash.net 2003-06-06 16:14 -------
Subject: Re: <iostream> causes transform() to not
compile with tolower()
At 01:40 PM 6/6/2003 +0000, you wrote:
>| string lcase (const string & s)
>| {
>| string result = s;
>| transform (result.begin(), result.end(), result.begin(), tolower);
>
>This is a known issue. See the FAQ and a recent talk of mine and
>Benjamin's at the recent ACCU conference.
Where might I find this FAQ? I have looked on
accu.org and accuconference.com to no avail.
Could you please comment more on why this code compiles and executes just
fine as long as I do NOT include <iostream>. The *inconsistent* handling of
this code by g++ does seem to be a bug (at least a gnat anyway).
Also, this broken code was taken directly from a very well known STL
book... Should I just chalk this up to a "tightening" of the g++ compiler
per the evolving C++ standard?
I guess my "work-around" will be to put a wrapper around tolower()? Is
there any discussion in the standards world about adding template
compatible tolower/toupper objects? Just curious.
thanks