forked from boostorg/regex
1) Disabled recursive implementation for VC8: stack overflows can't be reliably detected unless the whole program is compiled with asynchronous exceptions.
2) Changed std::copy calls on VC8 to avoid "dangerous code" warnings. 3) Moved backreference and octal escape code into line with POSIX-extended requirements. 4) Changed match_results leftmost-longest rules to stop unnecessary std::distance computations (an optimisation for non-random access iterators). 5) Changed C lib calls to use "safe" versions of string API's where available. 6) Added many new POSIX-extended leftmost-longest tests, to verify the above. [SVN r27880]
This commit is contained in:
@ -41,7 +41,7 @@ OutputIterator regex_replace(OutputIterator out,
|
||||
if(i == j)
|
||||
{
|
||||
if(!(flags & regex_constants::format_no_copy))
|
||||
out = std::copy(first, last, out);
|
||||
out = re_detail::copy(first, last, out);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -49,7 +49,7 @@ OutputIterator regex_replace(OutputIterator out,
|
||||
while(i != j)
|
||||
{
|
||||
if(!(flags & regex_constants::format_no_copy))
|
||||
out = std::copy(i->prefix().first, i->prefix().second, out);
|
||||
out = re_detail::copy(i->prefix().first, i->prefix().second, out);
|
||||
out = i->format(out, fmt, flags, e);
|
||||
last_m = (*i)[0].second;
|
||||
if(flags & regex_constants::format_first_only)
|
||||
@ -57,7 +57,7 @@ OutputIterator regex_replace(OutputIterator out,
|
||||
++i;
|
||||
}
|
||||
if(!(flags & regex_constants::format_no_copy))
|
||||
out = std::copy(last_m, last, out);
|
||||
out = re_detail::copy(last_m, last, out);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
Reference in New Issue
Block a user