|
Boost-Commit : |
From: john_at_[hidden]
Date: 2008-08-23 07:40:58
Author: johnmaddock
Date: 2008-08-23 07:40:58 EDT (Sat, 23 Aug 2008)
New Revision: 48312
URL: http://svn.boost.org/trac/boost/changeset/48312
Log:
Tentative fix for issue #2244: ICU uses wchar_t as UCHAR whenever sizeof(wchar_t) == 2.
Text files modified:
trunk/boost/regex/icu.hpp | 10 +++++-----
trunk/boost/regex/v4/u32regex_iterator.hpp | 2 +-
trunk/boost/regex/v4/u32regex_token_iterator.hpp | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
Modified: trunk/boost/regex/icu.hpp
==============================================================================
--- trunk/boost/regex/icu.hpp (original)
+++ trunk/boost/regex/icu.hpp 2008-08-23 07:40:58 EDT (Sat, 23 Aug 2008)
@@ -355,7 +355,7 @@
return re_detail::do_make_u32regex(p, p + std::wcslen(p), opt, static_cast<boost::mpl::int_<sizeof(wchar_t)> const*>(0));
}
#endif
-#ifndef U_WCHAR_IS_UTF16
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
inline u32regex make_u32regex(const UChar* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
{
return re_detail::do_make_u32regex(p, p + u_strlen(p), opt, static_cast<boost::mpl::int_<2> const*>(0));
@@ -455,7 +455,7 @@
{
return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
}
-#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_match(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
@@ -519,7 +519,7 @@
match_results<const UChar*> m;
return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
}
-#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_match(const wchar_t* p,
const u32regex& e,
match_flag_type flags = match_default)
@@ -640,7 +640,7 @@
{
return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
}
-#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_search(const wchar_t* p,
match_results<const wchar_t*>& m,
const u32regex& e,
@@ -701,7 +701,7 @@
match_results<const UChar*> m;
return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
}
-#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
inline bool u32regex_search(const wchar_t* p,
const u32regex& e,
match_flag_type flags = match_default)
Modified: trunk/boost/regex/v4/u32regex_iterator.hpp
==============================================================================
--- trunk/boost/regex/v4/u32regex_iterator.hpp (original)
+++ trunk/boost/regex/v4/u32regex_iterator.hpp 2008-08-23 07:40:58 EDT (Sat, 23 Aug 2008)
@@ -166,7 +166,7 @@
return u32regex_iterator<const wchar_t*>(p, p+std::wcslen(p), e, m);
}
#endif
-#ifndef U_WCHAR_IS_UTF16
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
inline u32regex_iterator<const UChar*> make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
{
return u32regex_iterator<const UChar*>(p, p+u_strlen(p), e, m);
Modified: trunk/boost/regex/v4/u32regex_token_iterator.hpp
==============================================================================
--- trunk/boost/regex/v4/u32regex_token_iterator.hpp (original)
+++ trunk/boost/regex/v4/u32regex_token_iterator.hpp 2008-08-23 07:40:58 EDT (Sat, 23 Aug 2008)
@@ -282,7 +282,7 @@
return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
}
#endif
-#ifndef U_WCHAR_IS_UTF16
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
{
return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, m);
@@ -313,7 +313,7 @@
return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
}
#endif
-#ifndef U_WCHAR_IS_UTF16
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
template <std::size_t N>
inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
{
@@ -344,7 +344,7 @@
return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
}
#endif
-#ifndef U_WCHAR_IS_UTF16
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
{
return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, m);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk