summaryrefslogtreecommitdiff
path: root/boost/xpressive/traits/detail/c_ctype.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/xpressive/traits/detail/c_ctype.hpp')
-rw-r--r--boost/xpressive/traits/detail/c_ctype.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/boost/xpressive/traits/detail/c_ctype.hpp b/boost/xpressive/traits/detail/c_ctype.hpp
index 5ed5d97c78..40788c46cd 100644
--- a/boost/xpressive/traits/detail/c_ctype.hpp
+++ b/boost/xpressive/traits/detail/c_ctype.hpp
@@ -496,8 +496,7 @@ struct char_class_impl<char>
static bool isctype(char ch, char_class_type mask)
{
- using namespace std;
- if(0 != __isctype(static_cast<unsigned char>(ch), mask))
+ if(glibc_isctype(ch, mask))
{
return true;
}
@@ -511,6 +510,15 @@ struct char_class_impl<char>
return false;
}
+
+ static bool glibc_isctype(char ch, char_class_type mask)
+ {
+ #ifdef __isctype
+ return 0 != __isctype(ch, mask);
+ #else
+ return 0 != ((*__ctype_b_loc())[(int)(ch)] & (unsigned short int)mask);
+ #endif
+ }
};
#ifndef BOOST_XPRESSIVE_NO_WREGEX