forked from boostorg/regex
Suppress external templates with Mingw32 - it seems to cause issues with dll's.
Fix match_results.swap. Add missing namespace qualifiers to ICU code: fixes #3631. [SVN r57739]
This commit is contained in:
@ -92,6 +92,12 @@
|
||||
#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
#endif
|
||||
/*
|
||||
* Shared regex lib will crash without this, frankly it looks a lot like a gcc bug:
|
||||
*/
|
||||
#if defined(__MINGW32__)
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there isn't good enough wide character support then there will
|
||||
|
@ -376,7 +376,7 @@ inline u32regex make_u32regex(const std::basic_string<C, T, A>& s, boost::regex_
|
||||
//
|
||||
// Construction from ICU string type:
|
||||
//
|
||||
inline u32regex make_u32regex(const UnicodeString& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
inline u32regex make_u32regex(const U_NAMESPACE_QUALIFIER UnicodeString& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
{
|
||||
return re_detail::do_make_u32regex(s.getBuffer(), s.getBuffer() + s.length(), opt, static_cast<boost::mpl::int_<2> const*>(0));
|
||||
}
|
||||
@ -498,7 +498,7 @@ inline bool u32regex_match(const std::wstring& s,
|
||||
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_match(const UnicodeString& s,
|
||||
inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
|
||||
match_results<const UChar*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
@ -562,7 +562,7 @@ inline bool u32regex_match(const std::wstring& s,
|
||||
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_match(const UnicodeString& s,
|
||||
inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
@ -683,7 +683,7 @@ inline bool u32regex_search(const std::wstring& s,
|
||||
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_search(const UnicodeString& s,
|
||||
inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
|
||||
match_results<const UChar*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
@ -744,7 +744,7 @@ inline bool u32regex_search(const std::wstring& s,
|
||||
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_search(const UnicodeString& s,
|
||||
inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
@ -921,7 +921,7 @@ inline OutputIterator u32regex_replace(OutputIterator out,
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
const u32regex& e,
|
||||
const UnicodeString& fmt,
|
||||
const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::extract_output_base
|
||||
@ -966,9 +966,9 @@ namespace re_detail{
|
||||
|
||||
class unicode_string_out_iterator
|
||||
{
|
||||
UnicodeString* out;
|
||||
U_NAMESPACE_QUALIFIER UnicodeString* out;
|
||||
public:
|
||||
unicode_string_out_iterator(UnicodeString& s) : out(&s) {}
|
||||
unicode_string_out_iterator(U_NAMESPACE_QUALIFIER UnicodeString& s) : out(&s) {}
|
||||
unicode_string_out_iterator& operator++() { return *this; }
|
||||
unicode_string_out_iterator& operator++(int) { return *this; }
|
||||
unicode_string_out_iterator& operator*() { return *this; }
|
||||
@ -986,23 +986,23 @@ public:
|
||||
|
||||
}
|
||||
|
||||
inline UnicodeString u32regex_replace(const UnicodeString& s,
|
||||
inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
|
||||
const u32regex& e,
|
||||
const UChar* fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
UnicodeString result;
|
||||
U_NAMESPACE_QUALIFIER UnicodeString result;
|
||||
re_detail::unicode_string_out_iterator i(result);
|
||||
u32regex_replace(i, s.getBuffer(), s.getBuffer()+s.length(), e, fmt, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
inline UnicodeString u32regex_replace(const UnicodeString& s,
|
||||
inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
|
||||
const u32regex& e,
|
||||
const UnicodeString& fmt,
|
||||
const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
UnicodeString result;
|
||||
U_NAMESPACE_QUALIFIER UnicodeString result;
|
||||
re_detail::unicode_string_out_iterator i(result);
|
||||
re_detail::do_regex_replace(
|
||||
re_detail::make_utf32_out(i, static_cast<mpl::int_<2> const*>(0)),
|
||||
|
@ -348,6 +348,8 @@ public:
|
||||
{
|
||||
std::swap(m_subs, that.m_subs);
|
||||
std::swap(m_base, that.m_base);
|
||||
std::swap(m_named_subs, that.m_named_subs);
|
||||
std::swap(m_last_closed_paren, that.m_last_closed_paren);
|
||||
}
|
||||
bool operator==(const match_results& that)const
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ inline u32regex_iterator<typename std::basic_string<charT, Traits, Alloc>::const
|
||||
typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
|
||||
return u32regex_iterator<iter_type>(p.begin(), p.end(), e, m);
|
||||
}
|
||||
inline u32regex_iterator<const UChar*> make_u32regex_iterator(const UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
|
||||
inline 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)
|
||||
{
|
||||
return u32regex_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, m);
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>:
|
||||
typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
|
||||
return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
|
||||
}
|
||||
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)
|
||||
inline 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)
|
||||
{
|
||||
return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
|
||||
}
|
||||
@ -327,7 +327,7 @@ inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>:
|
||||
return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
|
||||
}
|
||||
template <std::size_t N>
|
||||
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)
|
||||
inline 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)
|
||||
{
|
||||
return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
|
||||
}
|
||||
@ -356,7 +356,7 @@ inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>:
|
||||
typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
|
||||
return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
|
||||
}
|
||||
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)
|
||||
inline 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)
|
||||
{
|
||||
return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
|
||||
}
|
||||
|
Reference in New Issue
Block a user