[Bug c++/11108] <iostream> causes transform() to not compile with tolower()

davidg@flash.net gcc-bugzilla@gcc.gnu.org
Fri Jun 6 16:14:00 GMT 2003


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



More information about the Gcc-bugs mailing list