Ticket #3631: boost_regex.patch

File boost_regex.patch, 7.8 KB (added by Matthias Schiffer <matthias@…>, 13 years ago)

Patch

  • boost/regex/icu.hpp

    diff -dur boost_1_40_0.orig/boost/regex/icu.hpp boost_1_40_0/boost/regex/icu.hpp
    old new  
    376376//
    377377// Construction from ICU string type:
    378378//
    379 inline u32regex make_u32regex(const UnicodeString& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
     379inline u32regex make_u32regex(const U_NAMESPACE_QUALIFIER UnicodeString& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
    380380{
    381381   return re_detail::do_make_u32regex(s.getBuffer(), s.getBuffer() + s.length(), opt, static_cast<boost::mpl::int_<2> const*>(0));
    382382}
     
    498498   return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
    499499}
    500500#endif
    501 inline bool u32regex_match(const UnicodeString& s,
     501inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
    502502                        match_results<const UChar*>& m,
    503503                        const u32regex& e,
    504504                        match_flag_type flags = match_default)
     
    562562   return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
    563563}
    564564#endif
    565 inline bool u32regex_match(const UnicodeString& s,
     565inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
    566566                        const u32regex& e,
    567567                        match_flag_type flags = match_default)
    568568{
     
    683683   return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
    684684}
    685685#endif
    686 inline bool u32regex_search(const UnicodeString& s,
     686inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
    687687                        match_results<const UChar*>& m,
    688688                        const u32regex& e,
    689689                        match_flag_type flags = match_default)
     
    744744   return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
    745745}
    746746#endif
    747 inline bool u32regex_search(const UnicodeString& s,
     747inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
    748748                        const u32regex& e,
    749749                        match_flag_type flags = match_default)
    750750{
     
    921921                         Iterator first,
    922922                         Iterator last,
    923923                         const u32regex& e,
    924                          const UnicodeString& fmt,
     924                         const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
    925925                         match_flag_type flags = match_default)
    926926{
    927927   return re_detail::extract_output_base
     
    966966
    967967class unicode_string_out_iterator
    968968{
    969    UnicodeString* out;
     969   U_NAMESPACE_QUALIFIER UnicodeString* out;
    970970public:
    971    unicode_string_out_iterator(UnicodeString& s) : out(&s) {}
     971   unicode_string_out_iterator(U_NAMESPACE_QUALIFIER UnicodeString& s) : out(&s) {}
    972972   unicode_string_out_iterator& operator++() { return *this; }
    973973   unicode_string_out_iterator& operator++(int) { return *this; }
    974974   unicode_string_out_iterator& operator*() { return *this; }
     
    986986
    987987}
    988988
    989 inline UnicodeString u32regex_replace(const UnicodeString& s,
     989inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
    990990                         const u32regex& e,
    991991                         const UChar* fmt,
    992992                         match_flag_type flags = match_default)
    993993{
    994    UnicodeString result;
     994   U_NAMESPACE_QUALIFIER UnicodeString result;
    995995   re_detail::unicode_string_out_iterator i(result);
    996996   u32regex_replace(i, s.getBuffer(), s.getBuffer()+s.length(), e, fmt, flags);
    997997   return result;
    998998}
    999999
    1000 inline UnicodeString u32regex_replace(const UnicodeString& s,
     1000inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
    10011001                         const u32regex& e,
    1002                          const UnicodeString& fmt,
     1002                         const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
    10031003                         match_flag_type flags = match_default)
    10041004{
    1005    UnicodeString result;
     1005   U_NAMESPACE_QUALIFIER UnicodeString result;
    10061006   re_detail::unicode_string_out_iterator i(result);
    10071007   re_detail::do_regex_replace(
    10081008         re_detail::make_utf32_out(i, static_cast<mpl::int_<2> const*>(0)),
  • boost/regex/v4/u32regex_iterator.hpp

    diff -dur boost_1_40_0.orig/boost/regex/v4/u32regex_iterator.hpp boost_1_40_0/boost/regex/v4/u32regex_iterator.hpp
    old new  
    178178   typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
    179179   return u32regex_iterator<iter_type>(p.begin(), p.end(), e, m);
    180180}
    181 inline u32regex_iterator<const UChar*> make_u32regex_iterator(const UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
     181inline u32regex_iterator<const UChar*> make_u32regex_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
    182182{
    183183   return u32regex_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, m);
    184184}
  • boost/regex/v4/u32regex_token_iterator.hpp

    diff -dur boost_1_40_0.orig/boost/regex/v4/u32regex_token_iterator.hpp boost_1_40_0/boost/regex/v4/u32regex_token_iterator.hpp
    old new  
    294294   typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
    295295   return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
    296296}
    297 inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UnicodeString& s, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
     297inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
    298298{
    299299   return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
    300300}
     
    327327   return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
    328328}
    329329template <std::size_t N>
    330 inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UnicodeString& s, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
     330inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
    331331{
    332332   return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
    333333}
     
    356356   typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
    357357   return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
    358358}
    359 inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UnicodeString& s, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
     359inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
    360360{
    361361   return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
    362362}