This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]