This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11108] <iostream> causes transform() to not compile with tolower()
- From: "phil at phord dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jun 2008 16:26:29 -0000
- Subject: [Bug libstdc++/11108] <iostream> causes transform() to not compile with tolower()
- References: <bug-11108-6231@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from phil at phord dot com 2008-06-03 16:26 -------
Gabriel's PDF can now be found here:
http://www-sop.inria.fr/galaad/personnel/gdr/C++/talks/type-of-toupper.pdf
All the other links referenced in this comment section are dead.
Quick fix from the PDF (in case it goes away again):
Provide a manual cast for toupper to explicitly declare "which toupper" we
mean.
std::transform(&s[0], &s[0] + 5, &s[0],
static_cast<int (*)(int)>(std::toupper));
(This solution is rejected in the PDF. Read the whole thing if you want to
know why.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11108