diff options
author | dim <dim@FreeBSD.org> | 2017-04-02 17:24:58 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2017-04-02 17:24:58 +0000 |
commit | 60b571e49a90d38697b3aca23020d9da42fc7d7f (patch) | |
tree | 99351324c24d6cb146b6285b6caffa4d26fce188 /contrib/libc++/include/regex | |
parent | bea1b22c7a9bce1dfdd73e6e5b65bc4752215180 (diff) | |
download | FreeBSD-src-60b571e49a90d38697b3aca23020d9da42fc7d7f.zip FreeBSD-src-60b571e49a90d38697b3aca23020d9da42fc7d7f.tar.gz |
Update clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release:
MFC r309142 (by emaste):
Add WITH_LLD_AS_LD build knob
If set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is not
capable of linking the world and kernel, but can self-host and link many
substantial applications. GNU ld continues to be used for the world and
kernel build, regardless of how this knob is set.
It is on by default for arm64, and off for all other CPU architectures.
Sponsored by: The FreeBSD Foundation
MFC r310840:
Reapply 310775, now it also builds correctly if lldb is disabled:
Move llvm-objdump from CLANG_EXTRAS to installed by default
We currently install three tools from binutils 2.17.50: as, ld, and
objdump. Work is underway to migrate to a permissively-licensed
tool-chain, with one goal being the retirement of binutils 2.17.50.
LLVM's llvm-objdump is intended to be compatible with GNU objdump
although it is currently missing some options and may have formatting
differences. Enable it by default for testing and further investigation.
It may later be changed to install as /usr/bin/objdump, it becomes a
fully viable replacement.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D8879
MFC r312855 (by emaste):
Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CC
Reported by: Dan McGregor <dan.mcgregor usask.ca>
MFC r313559 | glebius | 2017-02-10 18:34:48 +0100 (Fri, 10 Feb 2017) | 5 lines
Don't check struct rtentry on FreeBSD, it is an internal kernel structure.
On other systems it may be API structure for SIOCADDRT/SIOCDELRT.
Reviewed by: emaste, dim
MFC r314152 (by jkim):
Remove an assembler flag, which is redundant since r309124. The upstream
took care of it by introducing a macro NO_EXEC_STACK_DIRECTIVE.
http://llvm.org/viewvc/llvm-project?rev=273500&view=rev
Reviewed by: dim
MFC r314564:
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
4.0.0 (branches/release_40 296509). The release will follow soon.
Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.
Also note that as of 4.0.0, lld should be able to link the base system
on amd64 and aarch64. See the WITH_LLD_IS_LLD setting in src.conf(5).
Though please be aware that this is work in progress.
Release notes for llvm, clang and lld will be available here:
<http://releases.llvm.org/4.0.0/docs/ReleaseNotes.html>
<http://releases.llvm.org/4.0.0/tools/clang/docs/ReleaseNotes.html>
<http://releases.llvm.org/4.0.0/tools/lld/docs/ReleaseNotes.html>
Thanks to Ed Maste, Jan Beich, Antoine Brodin and Eric Fiselier for
their help.
Relnotes: yes
Exp-run: antoine
PR: 215969, 216008
MFC r314708:
For now, revert r287232 from upstream llvm trunk (by Daniil Fukalov):
[SCEV] limit recursion depth of CompareSCEVComplexity
Summary:
CompareSCEVComplexity goes too deep (50+ on a quite a big unrolled
loop) and runs almost infinite time.
Added cache of "equal" SCEV pairs to earlier cutoff of further
estimation. Recursion depth limit was also introduced as a parameter.
Reviewers: sanjoy
Subscribers: mzolotukhin, tstellarAMD, llvm-commits
Differential Revision: https://reviews.llvm.org/D26389
This commit is the cause of excessive compile times on skein_block.c
(and possibly other files) during kernel builds on amd64.
We never saw the problematic behavior described in this upstream commit,
so for now it is better to revert it. An upstream bug has been filed
here: https://bugs.llvm.org/show_bug.cgi?id=32142
Reported by: mjg
MFC r314795:
Reapply r287232 from upstream llvm trunk (by Daniil Fukalov):
[SCEV] limit recursion depth of CompareSCEVComplexity
Summary:
CompareSCEVComplexity goes too deep (50+ on a quite a big unrolled
loop) and runs almost infinite time.
Added cache of "equal" SCEV pairs to earlier cutoff of further
estimation. Recursion depth limit was also introduced as a parameter.
Reviewers: sanjoy
Subscribers: mzolotukhin, tstellarAMD, llvm-commits
Differential Revision: https://reviews.llvm.org/D26389
Pull in r296992 from upstream llvm trunk (by Sanjoy Das):
[SCEV] Decrease the recursion threshold for CompareValueComplexity
Fixes PR32142.
r287232 accidentally increased the recursion threshold for
CompareValueComplexity from 2 to 32. This change reverses that
change by introducing a separate flag for CompareValueComplexity's
threshold.
The latter revision fixes the excessive compile times for skein_block.c.
MFC r314907 | mmel | 2017-03-08 12:40:27 +0100 (Wed, 08 Mar 2017) | 7 lines
Unbreak ARMv6 world.
The new compiler_rt library imported with clang 4.0.0 have several fatal
issues (non-functional __udivsi3 for example) with ARM specific instrict
functions. As temporary workaround, until upstream solve these problems,
disable all thumb[1][2] related feature.
MFC r315016:
Update clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release.
We were already very close to the last release candidate, so this is a
pretty minor update.
Relnotes: yes
MFC r316005:
Revert r314907, and pull in r298713 from upstream compiler-rt trunk (by
Weiming Zhao):
builtins: Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA.
Summary:
Value of __ARM_ARCH_ISA_THUMB isn't based on the actual compilation
mode (-mthumb, -marm), it reflect's capability of given CPU.
Due to this:
- use __tbumb__ and __thumb2__ insteand of __ARM_ARCH_ISA_THUMB
- use '.thumb' directive consistently in all affected files
- decorate all thumb functions using
DEFINE_COMPILERRT_THUMB_FUNCTION()
---------
Note: This patch doesn't fix broken Thumb1 variant of __udivsi3 !
Reviewers: weimingz, rengolin, compnerd
Subscribers: aemerson, dim
Differential Revision: https://reviews.llvm.org/D30938
Discussed with: mmel
Diffstat (limited to 'contrib/libc++/include/regex')
-rw-r--r-- | contrib/libc++/include/regex | 183 |
1 files changed, 114 insertions, 69 deletions
diff --git a/contrib/libc++/include/regex b/contrib/libc++/include/regex index 1139d8f..42e55e8 100644 --- a/contrib/libc++/include/regex +++ b/contrib/libc++/include/regex @@ -127,6 +127,8 @@ class basic_regex public: // types: typedef charT value_type; + typedef traits traits_type; + typedef typename traits::string_type string_type; typedef regex_constants::syntax_option_type flag_type; typedef typename traits::locale_type locale_type; @@ -145,7 +147,7 @@ public: // construct/copy/destroy: basic_regex(); explicit basic_regex(const charT* p, flag_type f = regex_constants::ECMAScript); - basic_regex(const charT* p, size_t len, flag_type f); + basic_regex(const charT* p, size_t len, flag_type f = regex_constants::ECMAScript); basic_regex(const basic_regex&); basic_regex(basic_regex&&) noexcept; template <class ST, class SA> @@ -762,7 +764,6 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; #include <memory> #include <vector> #include <deque> -#include <cassert> #include <__undef_min_max> @@ -864,7 +865,8 @@ enum match_flag_type format_sed = 1 << 8, format_no_copy = 1 << 9, format_first_only = 1 << 10, - __no_update_pos = 1 << 11 + __no_update_pos = 1 << 11, + __full_match = 1 << 12 }; inline _LIBCPP_INLINE_VISIBILITY @@ -957,18 +959,18 @@ public: }; template <regex_constants::error_type _Ev> -_LIBCPP_ALWAYS_INLINE +_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE void __throw_regex_error() { #ifndef _LIBCPP_NO_EXCEPTIONS throw regex_error(_Ev); #else - assert(!"regex_error"); + _VSTD::abort(); #endif } template <class _CharT> -struct _LIBCPP_TYPE_VIS_ONLY regex_traits +struct _LIBCPP_TEMPLATE_VIS regex_traits { public: typedef _CharT char_type; @@ -1285,11 +1287,11 @@ regex_traits<_CharT>::__regex_traits_value(wchar_t __ch, int __radix) const template <class _CharT> class __node; -template <class _BidirectionalIterator> class _LIBCPP_TYPE_VIS_ONLY sub_match; +template <class _BidirectionalIterator> class _LIBCPP_TEMPLATE_VIS sub_match; template <class _BidirectionalIterator, class _Allocator = allocator<sub_match<_BidirectionalIterator> > > -class _LIBCPP_TYPE_VIS_ONLY match_results; +class _LIBCPP_TEMPLATE_VIS match_results; template <class _CharT> struct __state @@ -2470,11 +2472,13 @@ __exit: template <class _CharT, class _Traits> class __lookahead; template <class _CharT, class _Traits = regex_traits<_CharT> > -class _LIBCPP_TYPE_VIS_ONLY basic_regex +class _LIBCPP_TEMPLATE_VIS basic_regex { public: // types: typedef _CharT value_type; + typedef _Traits traits_type; + typedef typename _Traits::string_type string_type; typedef regex_constants::syntax_option_type flag_type; typedef typename _Traits::locale_type locale_type; @@ -2515,7 +2519,7 @@ public: __end_(0) {__parse(__p, __p + __traits_.length(__p));} _LIBCPP_INLINE_VISIBILITY - basic_regex(const value_type* __p, size_t __len, flag_type __f) + basic_regex(const value_type* __p, size_t __len, flag_type __f = regex_constants::ECMAScript) : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0), __end_(0) {__parse(__p, __p + __len);} @@ -2981,10 +2985,12 @@ __lookahead<_CharT, _Traits>::__exec(__state& __s) const { match_results<const _CharT*> __m; __m.__init(1 + __exp_.mark_count(), __s.__current_, __s.__last_); - bool __matched = __exp_.__match_at_start_ecma(__s.__current_, __s.__last_, - __m, - __s.__flags_ | regex_constants::match_continuous, - __s.__at_first_ && __s.__current_ == __s.__first_); + bool __matched = __exp_.__match_at_start_ecma( + __s.__current_, __s.__last_, + __m, + (__s.__flags_ | regex_constants::match_continuous) & + ~regex_constants::__full_match, + __s.__at_first_ && __s.__current_ == __s.__first_); if (__matched != __invert_) { __s.__do_ = __state::__accept_but_not_consume; @@ -4308,7 +4314,8 @@ basic_regex<_CharT, _Traits>::__parse_decimal_escape(_ForwardIterator __first, else if ('1' <= *__first && *__first <= '9') { unsigned __v = *__first - '0'; - for (++__first; '0' <= *__first && *__first <= '9'; ++__first) + for (++__first; + __first != __last && '0' <= *__first && *__first <= '9'; ++__first) __v = 10 * __v + *__first - '0'; if (__v > mark_count()) __throw_regex_error<regex_constants::error_backref>(); @@ -4758,7 +4765,7 @@ typedef basic_regex<wchar_t> wregex; // sub_match template <class _BidirectionalIterator> -class _LIBCPP_TYPE_VIS_ONLY sub_match +class _LIBCPP_TEMPLATE_VIS sub_match : public pair<_BidirectionalIterator, _BidirectionalIterator> { public: @@ -5181,7 +5188,7 @@ operator<<(basic_ostream<_CharT, _ST>& __os, const sub_match<_BiIter>& __m) } template <class _BidirectionalIterator, class _Allocator> -class _LIBCPP_TYPE_VIS_ONLY match_results +class _LIBCPP_TEMPLATE_VIS match_results { public: typedef _Allocator allocator_type; @@ -5255,15 +5262,15 @@ public: // format: template <class _OutputIter> _OutputIter - format(_OutputIter __out, const char_type* __fmt_first, + format(_OutputIter __output, const char_type* __fmt_first, const char_type* __fmt_last, regex_constants::match_flag_type __flags = regex_constants::format_default) const; template <class _OutputIter, class _ST, class _SA> _LIBCPP_INLINE_VISIBILITY _OutputIter - format(_OutputIter __out, const basic_string<char_type, _ST, _SA>& __fmt, + format(_OutputIter __output, const basic_string<char_type, _ST, _SA>& __fmt, regex_constants::match_flag_type __flags = regex_constants::format_default) const - {return format(__out, __fmt.data(), __fmt.data() + __fmt.size(), __flags);} + {return format(__output, __fmt.data(), __fmt.data() + __fmt.size(), __flags);} template <class _ST, class _SA> _LIBCPP_INLINE_VISIBILITY basic_string<char_type, _ST, _SA> @@ -5375,7 +5382,7 @@ match_results<_BidirectionalIterator, _Allocator>::__init(unsigned __s, template <class _BidirectionalIterator, class _Allocator> template <class _OutputIter> _OutputIter -match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __out, +match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output, const char_type* __fmt_first, const char_type* __fmt_last, regex_constants::match_flag_type __flags) const { @@ -5384,27 +5391,27 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __out, for (; __fmt_first != __fmt_last; ++__fmt_first) { if (*__fmt_first == '&') - __out = _VSTD::copy(__matches_[0].first, __matches_[0].second, - __out); + __output = _VSTD::copy(__matches_[0].first, __matches_[0].second, + __output); else if (*__fmt_first == '\\' && __fmt_first + 1 != __fmt_last) { ++__fmt_first; if ('0' <= *__fmt_first && *__fmt_first <= '9') { size_t __i = *__fmt_first - '0'; - __out = _VSTD::copy((*this)[__i].first, - (*this)[__i].second, __out); + __output = _VSTD::copy((*this)[__i].first, + (*this)[__i].second, __output); } else { - *__out = *__fmt_first; - ++__out; + *__output = *__fmt_first; + ++__output; } } else { - *__out = *__fmt_first; - ++__out; + *__output = *__fmt_first; + ++__output; } } } @@ -5417,21 +5424,21 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __out, switch (__fmt_first[1]) { case '$': - *__out = *++__fmt_first; - ++__out; + *__output = *++__fmt_first; + ++__output; break; case '&': ++__fmt_first; - __out = _VSTD::copy(__matches_[0].first, __matches_[0].second, - __out); + __output = _VSTD::copy(__matches_[0].first, __matches_[0].second, + __output); break; case '`': ++__fmt_first; - __out = _VSTD::copy(__prefix_.first, __prefix_.second, __out); + __output = _VSTD::copy(__prefix_.first, __prefix_.second, __output); break; case '\'': ++__fmt_first; - __out = _VSTD::copy(__suffix_.first, __suffix_.second, __out); + __output = _VSTD::copy(__suffix_.first, __suffix_.second, __output); break; default: if ('0' <= __fmt_first[1] && __fmt_first[1] <= '9') @@ -5444,25 +5451,25 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __out, ++__fmt_first; __i = 10 * __i + *__fmt_first - '0'; } - __out = _VSTD::copy((*this)[__i].first, - (*this)[__i].second, __out); + __output = _VSTD::copy((*this)[__i].first, + (*this)[__i].second, __output); } else { - *__out = *__fmt_first; - ++__out; + *__output = *__fmt_first; + ++__output; } break; } } else { - *__out = *__fmt_first; - ++__out; + *__output = *__fmt_first; + ++__output; } } } - return __out; + return __output; } template <class _BidirectionalIterator, class _Allocator> @@ -5552,6 +5559,18 @@ basic_regex<_CharT, _Traits>::__match_at_start_ecma( switch (__s.__do_) { case __state::__end_state: + if ((__flags & regex_constants::match_not_null) && + __s.__current_ == __first) + { + __states.pop_back(); + break; + } + if ((__flags & regex_constants::__full_match) && + __s.__current_ != __last) + { + __states.pop_back(); + break; + } __m.__matches_[0].first = __first; __m.__matches_[0].second = _VSTD::next(__first, __s.__current_ - __first); __m.__matches_[0].matched = true; @@ -5615,6 +5634,18 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_nosubs( switch (__s.__do_) { case __state::__end_state: + if ((__flags & regex_constants::match_not_null) && + __s.__current_ == __first) + { + __states.pop_back(); + break; + } + if ((__flags & regex_constants::__full_match) && + __s.__current_ != __last) + { + __states.pop_back(); + break; + } if (!__matched || __highest_j < __s.__current_ - __s.__first_) __highest_j = __s.__current_ - __s.__first_; __matched = true; @@ -5700,6 +5731,18 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_subs( switch (__s.__do_) { case __state::__end_state: + if ((__flags & regex_constants::match_not_null) && + __s.__current_ == __first) + { + __states.pop_back(); + break; + } + if ((__flags & regex_constants::__full_match) && + __s.__current_ != __last) + { + __states.pop_back(); + break; + } if (!__matched || __highest_j < __s.__current_ - __s.__first_) { __highest_j = __s.__current_ - __s.__first_; @@ -5930,8 +5973,10 @@ regex_match(_BidirectionalIterator __first, _BidirectionalIterator __last, const basic_regex<_CharT, _Traits>& __e, regex_constants::match_flag_type __flags = regex_constants::match_default) { - bool __r = _VSTD::regex_search(__first, __last, __m, __e, - __flags | regex_constants::match_continuous); + bool __r = _VSTD::regex_search( + __first, __last, __m, __e, + __flags | regex_constants::match_continuous | + regex_constants::__full_match); if (__r) { __r = !__m.suffix().matched; @@ -6007,7 +6052,7 @@ regex_match(const basic_string<_CharT, _ST, _SA>& __s, template <class _BidirectionalIterator, class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type, class _Traits = regex_traits<_CharT> > -class _LIBCPP_TYPE_VIS_ONLY regex_iterator +class _LIBCPP_TEMPLATE_VIS regex_iterator { public: typedef basic_regex<_CharT, _Traits> regex_type; @@ -6126,7 +6171,7 @@ typedef regex_iterator<wstring::const_iterator> wsregex_iterator; template <class _BidirectionalIterator, class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type, class _Traits = regex_traits<_CharT> > -class _LIBCPP_TYPE_VIS_ONLY regex_token_iterator +class _LIBCPP_TEMPLATE_VIS regex_token_iterator { public: typedef basic_regex<_CharT, _Traits> regex_type; @@ -6142,7 +6187,7 @@ private: _Position __position_; const value_type* __result_; value_type __suffix_; - ptrdiff_t _N_; + ptrdiff_t __n_; vector<int> __subs_; public: @@ -6225,10 +6270,10 @@ public: private: void __init(_BidirectionalIterator __a, _BidirectionalIterator __b); void __establish_result () { - if (__subs_[_N_] == -1) + if (__subs_[__n_] == -1) __result_ = &__position_->prefix(); else - __result_ = &(*__position_)[__subs_[_N_]]; + __result_ = &(*__position_)[__subs_[__n_]]; } }; @@ -6237,7 +6282,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: regex_token_iterator() : __result_(nullptr), __suffix_(), - _N_(0) + __n_(0) { } @@ -6248,7 +6293,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: { if (__position_ != _Position()) __establish_result (); - else if (__subs_[_N_] == -1) + else if (__subs_[__n_] == -1) { __suffix_.matched = true; __suffix_.first = __a; @@ -6265,7 +6310,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: const regex_type& __re, int __submatch, regex_constants::match_flag_type __m) : __position_(__a, __b, __re, __m), - _N_(0), + __n_(0), __subs_(1, __submatch) { __init(__a, __b); @@ -6277,7 +6322,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: const regex_type& __re, const vector<int>& __submatches, regex_constants::match_flag_type __m) : __position_(__a, __b, __re, __m), - _N_(0), + __n_(0), __subs_(__submatches) { __init(__a, __b); @@ -6292,7 +6337,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: initializer_list<int> __submatches, regex_constants::match_flag_type __m) : __position_(__a, __b, __re, __m), - _N_(0), + __n_(0), __subs_(__submatches) { __init(__a, __b); @@ -6308,7 +6353,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: const int (&__submatches)[_Np], regex_constants::match_flag_type __m) : __position_(__a, __b, __re, __m), - _N_(0), + __n_(0), __subs_(__submatches, __submatches + _Np) { __init(__a, __b); @@ -6320,7 +6365,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: : __position_(__x.__position_), __result_(__x.__result_), __suffix_(__x.__suffix_), - _N_(__x._N_), + __n_(__x.__n_), __subs_(__x.__subs_) { if (__x.__result_ == &__x.__suffix_) @@ -6342,7 +6387,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: else __result_ = __x.__result_; __suffix_ = __x.__suffix_; - _N_ = __x._N_; + __n_ = __x.__n_; __subs_ = __x.__subs_; if ( __result_ != nullptr && __result_ != &__suffix_ ) @@ -6365,7 +6410,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>:: return false; if (__result_ == &__suffix_ || __x.__result_ == &__x.__suffix_) return false; - return __position_ == __x.__position_ && _N_ == __x._N_ && + return __position_ == __x.__position_ && __n_ == __x.__n_ && __subs_ == __x.__subs_; } @@ -6376,14 +6421,14 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++() _Position __prev = __position_; if (__result_ == &__suffix_) __result_ = nullptr; - else if (_N_ + 1 < __subs_.size()) + else if (static_cast<size_t>(__n_ + 1) < __subs_.size()) { - ++_N_; + ++__n_; __establish_result(); } else { - _N_ = 0; + __n_ = 0; ++__position_; if (__position_ != _Position()) __establish_result(); @@ -6414,7 +6459,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator; template <class _OutputIterator, class _BidirectionalIterator, class _Traits, class _CharT> _OutputIterator -regex_replace(_OutputIterator __out, +regex_replace(_OutputIterator __output, _BidirectionalIterator __first, _BidirectionalIterator __last, const basic_regex<_CharT, _Traits>& __e, const _CharT* __fmt, regex_constants::match_flag_type __flags = regex_constants::match_default) @@ -6425,7 +6470,7 @@ regex_replace(_OutputIterator __out, if (__i == __eof) { if (!(__flags & regex_constants::format_no_copy)) - __out = _VSTD::copy(__first, __last, __out); + __output = _VSTD::copy(__first, __last, __output); } else { @@ -6433,29 +6478,29 @@ regex_replace(_OutputIterator __out, for (size_t __len = char_traits<_CharT>::length(__fmt); __i != __eof; ++__i) { if (!(__flags & regex_constants::format_no_copy)) - __out = _VSTD::copy(__i->prefix().first, __i->prefix().second, __out); - __out = __i->format(__out, __fmt, __fmt + __len, __flags); + __output = _VSTD::copy(__i->prefix().first, __i->prefix().second, __output); + __output = __i->format(__output, __fmt, __fmt + __len, __flags); __lm = __i->suffix(); if (__flags & regex_constants::format_first_only) break; } if (!(__flags & regex_constants::format_no_copy)) - __out = _VSTD::copy(__lm.first, __lm.second, __out); + __output = _VSTD::copy(__lm.first, __lm.second, __output); } - return __out; + return __output; } template <class _OutputIterator, class _BidirectionalIterator, class _Traits, class _CharT, class _ST, class _SA> inline _LIBCPP_INLINE_VISIBILITY _OutputIterator -regex_replace(_OutputIterator __out, +regex_replace(_OutputIterator __output, _BidirectionalIterator __first, _BidirectionalIterator __last, const basic_regex<_CharT, _Traits>& __e, const basic_string<_CharT, _ST, _SA>& __fmt, regex_constants::match_flag_type __flags = regex_constants::match_default) { - return _VSTD::regex_replace(__out, __first, __last, __e, __fmt.c_str(), __flags); + return _VSTD::regex_replace(__output, __first, __last, __e, __fmt.c_str(), __flags); } template <class _Traits, class _CharT, class _ST, class _SA, class _FST, |