forked from boostorg/regex
regex fixes
[SVN r7967]
This commit is contained in:
@ -471,7 +471,7 @@ public:
|
||||
} // namespace re_detail
|
||||
|
||||
template <class OutputIterator, class iterator, class Allocator, class charT>
|
||||
OutputIterator BOOST_RE_CALL regex_format(OutputIterator out,
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
const match_results<iterator, Allocator>& m,
|
||||
const charT* fmt,
|
||||
unsigned flags = 0
|
||||
@ -482,18 +482,19 @@ OutputIterator BOOST_RE_CALL regex_format(OutputIterator out,
|
||||
}
|
||||
|
||||
template <class OutputIterator, class iterator, class Allocator, class charT>
|
||||
OutputIterator BOOST_RE_CALL regex_format(OutputIterator out,
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
const match_results<iterator, Allocator>& m,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned flags = 0
|
||||
)
|
||||
{
|
||||
regex_traits<charT> t;
|
||||
return re_detail::_reg_format_aux(out, m, fmt.c_str(), flags, t);
|
||||
const charT* start = fmt.c_str();
|
||||
return re_detail::_reg_format_aux(out, m, start, flags, t);
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator, class charT>
|
||||
std::basic_string<charT> BOOST_RE_CALL regex_format(const match_results<iterator, Allocator>& m, const charT* fmt, unsigned flags = 0)
|
||||
std::basic_string<charT> regex_format(const match_results<iterator, Allocator>& m, const charT* fmt, unsigned flags = 0)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
@ -502,7 +503,7 @@ std::basic_string<charT> BOOST_RE_CALL regex_format(const match_results<iterator
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator, class charT>
|
||||
std::basic_string<charT> BOOST_RE_CALL regex_format(const match_results<iterator, Allocator>& m, const std::basic_string<charT>& fmt, unsigned flags = 0)
|
||||
std::basic_string<charT> regex_format(const match_results<iterator, Allocator>& m, const std::basic_string<charT>& fmt, unsigned flags = 0)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
@ -511,7 +512,7 @@ std::basic_string<charT> BOOST_RE_CALL regex_format(const match_results<iterator
|
||||
}
|
||||
|
||||
template <class OutputIterator, class iterator, class traits, class Allocator, class charT>
|
||||
OutputIterator BOOST_RE_CALL regex_merge(OutputIterator out,
|
||||
OutputIterator regex_merge(OutputIterator out,
|
||||
iterator first,
|
||||
iterator last,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
@ -525,7 +526,7 @@ OutputIterator BOOST_RE_CALL regex_merge(OutputIterator out,
|
||||
}
|
||||
|
||||
template <class OutputIterator, class iterator, class traits, class Allocator, class charT>
|
||||
inline OutputIterator BOOST_RE_CALL regex_merge(OutputIterator out,
|
||||
inline OutputIterator regex_merge(OutputIterator out,
|
||||
iterator first,
|
||||
iterator last,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
@ -536,7 +537,7 @@ inline OutputIterator BOOST_RE_CALL regex_merge(OutputIterator out,
|
||||
}
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
std::basic_string<charT> BOOST_RE_CALL regex_merge(const std::basic_string<charT>& s,
|
||||
std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const charT* fmt,
|
||||
unsigned int flags = match_default)
|
||||
@ -548,7 +549,7 @@ std::basic_string<charT> BOOST_RE_CALL regex_merge(const std::basic_string<charT
|
||||
}
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
std::basic_string<charT> BOOST_RE_CALL regex_merge(const std::basic_string<charT>& s,
|
||||
std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned int flags = match_default)
|
||||
|
@ -71,7 +71,7 @@ bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
|
||||
// output sub-expressions only:
|
||||
for(unsigned i = 1; i < what.size(); ++i)
|
||||
{
|
||||
(*p_out) = static_cast<string_type>(what[i]);
|
||||
*(*p_out) = static_cast<string_type>(what[i]);
|
||||
++(*p_out);
|
||||
return --*p_max;
|
||||
}
|
||||
@ -82,7 +82,7 @@ bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
|
||||
const sub_match<iterator_type>& sub = what[-1];
|
||||
if((sub.first != sub.second) || (*p_max != initial_max))
|
||||
{
|
||||
(*p_out) = static_cast<string_type>(sub);
|
||||
*(*p_out) = static_cast<string_type>(sub);
|
||||
++(*p_out);
|
||||
return --*p_max;
|
||||
}
|
||||
@ -115,7 +115,7 @@ std::size_t regex_split(OutputIterator out,
|
||||
// than whitespace:
|
||||
if(max_split && (last != s.end()) && (e.mark_count() == 1))
|
||||
{
|
||||
out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end());
|
||||
*out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end());
|
||||
++out;
|
||||
last = s.end();
|
||||
}
|
||||
|
Reference in New Issue
Block a user