Author: sebor
Date: Tue Jun 5 16:06:56 2007
New Revision: 544672
URL: http://svn.apache.org/viewvc?view=rev&rev=544672
Log:
2007-06-05 Martin Sebor <[EMAIL PROTECTED]>
* insert_wchar.cpp (main): Parenthesized a call to isalnum() to prevent
macro expension in case the function happens to be (illegally) shadowed
by a macro.
Modified:
incubator/stdcxx/trunk/examples/manual/insert_wchar.cpp
Modified: incubator/stdcxx/trunk/examples/manual/insert_wchar.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/examples/manual/insert_wchar.cpp?view=diff&rev=544672&r1=544671&r2=544672
==============================================================================
--- incubator/stdcxx/trunk/examples/manual/insert_wchar.cpp (original)
+++ incubator/stdcxx/trunk/examples/manual/insert_wchar.cpp Tue Jun 5 16:06:56
2007
@@ -200,7 +200,10 @@
// where necessary
for (const char *pc = str.c_str (); *pc != '\0'; ++pc) {
- if (std::isalnum (*pc, std::cout.getloc ()))
+ // parenthesize isalnum to prevent macro expension
+ // in case the function happens to be (illegally)
+ // shadowed by a macro
+ if ((std::isalnum)(*pc, std::cout.getloc ()))
std::cout << *pc;
else
std::cout << "\\x" << int (UChar (*pc));