forked from boostorg/regex
merged from trunk
[SVN r48605]
This commit is contained in:
1 parent
003f785f4e
commit
a388804b3e
11 files changed
+75
-54
No files matched your search
@@ -87,12 +87,12 @@ struct regex_traits_architype
|
||||
public:
|
||||
regex_traits_architype();
|
||||
typedef charT char_type;
|
||||
typedef std::size_t size_type;
|
||||
// typedef std::size_t size_type;
|
||||
typedef std::vector<char_type> string_type;
|
||||
typedef copy_constructible_archetype<assignable_archetype<> > locale_type;
|
||||
typedef bitmask_archetype char_class_type;
|
||||
|
||||
static size_type length(const char_type* ) { return 0; }
|
||||
static std::size_t length(const char_type* ) { return 0; }
|
||||
|
||||
charT translate(charT ) const { return charT(); }
|
||||
charT translate_nocase(charT ) const { return static_object<charT>::get(); }
|
||||
@@ -163,21 +163,21 @@ struct RegexTraitsConcept
|
||||
RegexTraitsConcept();
|
||||
// required typedefs:
|
||||
typedef typename traits::char_type char_type;
|
||||
typedef typename traits::size_type size_type;
|
||||
// typedef typename traits::size_type size_type;
|
||||
typedef typename traits::string_type string_type;
|
||||
typedef typename traits::locale_type locale_type;
|
||||
typedef typename traits::char_class_type char_class_type;
|
||||
|
||||
void constraints()
|
||||
{
|
||||
function_requires<UnsignedIntegerConcept<size_type> >();
|
||||
//function_requires<UnsignedIntegerConcept<size_type> >();
|
||||
function_requires<RandomAccessContainerConcept<string_type> >();
|
||||
function_requires<DefaultConstructibleConcept<locale_type> >();
|
||||
function_requires<CopyConstructibleConcept<locale_type> >();
|
||||
function_requires<AssignableConcept<locale_type> >();
|
||||
function_requires<BitmaskConcept<char_class_type> >();
|
||||
|
||||
size_type n = traits::length(m_pointer);
|
||||
std::size_t n = traits::length(m_pointer);
|
||||
ignore_unused_variable_warning(n);
|
||||
|
||||
char_type c = m_ctraits.translate(m_char);
|
||||
|
||||
@@ -355,7 +355,7 @@ inline u32regex make_u32regex(const wchar_t* p, boost::regex_constants::syntax_o
|
||||
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 @@ inline bool u32regex_match(const UChar* p,
|
||||
{
|
||||
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 @@ inline bool u32regex_match(const UChar* p,
|
||||
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 @@ inline bool u32regex_search(const UChar* p,
|
||||
{
|
||||
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 @@ inline bool u32regex_search(const UChar* p,
|
||||
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)
|
||||
|
||||
@@ -191,7 +191,7 @@ class basic_regex : public regbase
|
||||
{
|
||||
public:
|
||||
// typedefs:
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
typedef std::size_t traits_size_type;
|
||||
typedef typename traits::string_type traits_string_type;
|
||||
typedef charT char_type;
|
||||
typedef traits traits_type;
|
||||
|
||||
@@ -331,7 +331,7 @@ public:
|
||||
typedef typename traits::char_type char_type;
|
||||
typedef perl_matcher<BidiIterator, Allocator, traits> self_type;
|
||||
typedef bool (self_type::*matcher_proc_type)(void);
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
typedef std::size_t traits_size_type;
|
||||
typedef typename is_byte<char_type>::width_type width_type;
|
||||
typedef typename regex_iterator_traits<BidiIterator>::difference_type difference_type;
|
||||
|
||||
|
||||
@@ -477,7 +477,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
|
||||
take_second = can_start(*position, rep->_map, (unsigned char)mask_skip);
|
||||
}
|
||||
|
||||
if(take_first || (next_count->get_id() != rep->id))
|
||||
if((m_backup_state->id != saved_state_repeater_count)
|
||||
|| (static_cast<saved_repeater<BidiIterator>*>(m_backup_state)->count.get_id() != rep->id)
|
||||
|| (next_count->get_id() != rep->id))
|
||||
{
|
||||
// we're moving to a different repeat from the last
|
||||
// one, so set up a counter object:
|
||||
|
||||
@@ -166,7 +166,7 @@ inline u32regex_iterator<const wchar_t*> make_u32regex_iterator(const wchar_t* p
|
||||
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);
|
||||
|
||||
@@ -282,7 +282,7 @@ inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(cons
|
||||
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 @@ inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(cons
|
||||
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 @@ inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(cons
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user