Index: include/algorithm =================================================================== --- include/algorithm +++ include/algorithm @@ -3210,28 +3210,28 @@ class _UniformRandomNumberGenerator> _LIBCPP_INLINE_VISIBILITY _SampleIterator __sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __output, + _PopulationIterator __last, _SampleIterator __output_iter, _Distance __n, _UniformRandomNumberGenerator & __g, input_iterator_tag) { _Distance __k = 0; for (; __first != __last && __k < __n; ++__first, (void)++__k) - __output[__k] = *__first; + __output_iter[__k] = *__first; _Distance __sz = __k; for (; __first != __last; ++__first, (void)++__k) { _Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, __k)(__g); if (__r < __sz) - __output[__r] = *__first; + __output_iter[__r] = *__first; } - return __output + _VSTD::min(__n, __k); + return __output_iter + _VSTD::min(__n, __k); } template _LIBCPP_INLINE_VISIBILITY _SampleIterator __sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __output, + _PopulationIterator __last, _SampleIterator __output_iter, _Distance __n, _UniformRandomNumberGenerator& __g, forward_iterator_tag) { @@ -3240,18 +3240,18 @@ _Distance __r = _VSTD::uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g); if (__r < __n) { - *__output++ = *__first; + *__output_iter++ = *__first; --__n; } } - return __output; + return __output_iter; } template _LIBCPP_INLINE_VISIBILITY _SampleIterator __sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __output, + _PopulationIterator __last, _SampleIterator __output_iter, _Distance __n, _UniformRandomNumberGenerator& __g) { typedef typename iterator_traits<_PopulationIterator>::iterator_category _PopCategory; @@ -3263,7 +3263,7 @@ typedef typename common_type<_Distance, _Difference>::type _CommonType; _LIBCPP_ASSERT(__n >= 0, "N must be a positive number."); return _VSTD::__sample( - __first, __last, __output, _CommonType(__n), + __first, __last, __output_iter, _CommonType(__n), __g, _PopCategory()); } @@ -3272,9 +3272,9 @@ class _UniformRandomNumberGenerator> inline _LIBCPP_INLINE_VISIBILITY _SampleIterator sample(_PopulationIterator __first, - _PopulationIterator __last, _SampleIterator __output, + _PopulationIterator __last, _SampleIterator __output_iter, _Distance __n, _UniformRandomNumberGenerator&& __g) { - return _VSTD::__sample(__first, __last, __output, __n, __g); + return _VSTD::__sample(__first, __last, __output_iter, __n, __g); } #endif // _LIBCPP_STD_VER > 14 Index: include/experimental/algorithm =================================================================== --- include/experimental/algorithm +++ include/experimental/algorithm @@ -61,9 +61,9 @@ class _UniformRandomNumberGenerator> inline _LIBCPP_INLINE_VISIBILITY _SampleIterator sample(_PopulationIterator __first, _PopulationIterator __last, - _SampleIterator __output, _Distance __n, + _SampleIterator __output_iter, _Distance __n, _UniformRandomNumberGenerator &&__g) { - return _VSTD::__sample(__first, __last, __output, __n, __g); + return _VSTD::__sample(__first, __last, __output_iter, __n, __g); } _LIBCPP_END_NAMESPACE_LFTS Index: include/experimental/iterator =================================================================== --- include/experimental/iterator +++ include/experimental/iterator @@ -75,19 +75,19 @@ typedef void reference; ostream_joiner(ostream_type& __os, _Delim&& __d) - : __output(_VSTD::addressof(__os)), __delim(_VSTD::move(__d)), __first(true) {} + : __output_iter(_VSTD::addressof(__os)), __delim(_VSTD::move(__d)), __first(true) {} ostream_joiner(ostream_type& __os, const _Delim& __d) - : __output(_VSTD::addressof(__os)), __delim(__d), __first(true) {} + : __output_iter(_VSTD::addressof(__os)), __delim(__d), __first(true) {} template ostream_joiner& operator=(const _Tp& __v) { if (!__first) - *__output << __delim; + *__output_iter << __delim; __first = false; - *__output << __v; + *__output_iter << __v; return *this; } @@ -96,7 +96,7 @@ ostream_joiner& operator++(int) _NOEXCEPT { return *this; } private: - ostream_type* __output; + ostream_type* __output_iter; _Delim __delim; bool __first; }; Index: include/regex =================================================================== --- include/regex +++ include/regex @@ -5277,15 +5277,15 @@ // format: template _OutputIter - format(_OutputIter __output, const char_type* __fmt_first, + format(_OutputIter __output_iter, const char_type* __fmt_first, const char_type* __fmt_last, regex_constants::match_flag_type __flags = regex_constants::format_default) const; template _LIBCPP_INLINE_VISIBILITY _OutputIter - format(_OutputIter __output, const basic_string& __fmt, + format(_OutputIter __output_iter, const basic_string& __fmt, regex_constants::match_flag_type __flags = regex_constants::format_default) const - {return format(__output, __fmt.data(), __fmt.data() + __fmt.size(), __flags);} + {return format(__output_iter, __fmt.data(), __fmt.data() + __fmt.size(), __flags);} template _LIBCPP_INLINE_VISIBILITY basic_string @@ -5397,7 +5397,7 @@ template template _OutputIter -match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output, +match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output_iter, const char_type* __fmt_first, const char_type* __fmt_last, regex_constants::match_flag_type __flags) const { @@ -5406,27 +5406,27 @@ for (; __fmt_first != __fmt_last; ++__fmt_first) { if (*__fmt_first == '&') - __output = _VSTD::copy(__matches_[0].first, __matches_[0].second, - __output); + __output_iter = _VSTD::copy(__matches_[0].first, __matches_[0].second, + __output_iter); else if (*__fmt_first == '\\' && __fmt_first + 1 != __fmt_last) { ++__fmt_first; if ('0' <= *__fmt_first && *__fmt_first <= '9') { size_t __i = *__fmt_first - '0'; - __output = _VSTD::copy((*this)[__i].first, - (*this)[__i].second, __output); + __output_iter = _VSTD::copy((*this)[__i].first, + (*this)[__i].second, __output_iter); } else { - *__output = *__fmt_first; - ++__output; + *__output_iter = *__fmt_first; + ++__output_iter; } } else { - *__output = *__fmt_first; - ++__output; + *__output_iter = *__fmt_first; + ++__output_iter; } } } @@ -5439,21 +5439,21 @@ switch (__fmt_first[1]) { case '$': - *__output = *++__fmt_first; - ++__output; + *__output_iter = *++__fmt_first; + ++__output_iter; break; case '&': ++__fmt_first; - __output = _VSTD::copy(__matches_[0].first, __matches_[0].second, - __output); + __output_iter = _VSTD::copy(__matches_[0].first, __matches_[0].second, + __output_iter); break; case '`': ++__fmt_first; - __output = _VSTD::copy(__prefix_.first, __prefix_.second, __output); + __output_iter = _VSTD::copy(__prefix_.first, __prefix_.second, __output_iter); break; case '\'': ++__fmt_first; - __output = _VSTD::copy(__suffix_.first, __suffix_.second, __output); + __output_iter = _VSTD::copy(__suffix_.first, __suffix_.second, __output_iter); break; default: if ('0' <= __fmt_first[1] && __fmt_first[1] <= '9') @@ -5468,25 +5468,25 @@ __throw_regex_error(); __idx = 10 * __idx + *__fmt_first - '0'; } - __output = _VSTD::copy((*this)[__idx].first, - (*this)[__idx].second, __output); + __output_iter = _VSTD::copy((*this)[__idx].first, + (*this)[__idx].second, __output_iter); } else { - *__output = *__fmt_first; - ++__output; + *__output_iter = *__fmt_first; + ++__output_iter; } break; } } else { - *__output = *__fmt_first; - ++__output; + *__output_iter = *__fmt_first; + ++__output_iter; } } } - return __output; + return __output_iter; } template @@ -6494,7 +6494,7 @@ template _OutputIterator -regex_replace(_OutputIterator __output, +regex_replace(_OutputIterator __output_iter, _BidirectionalIterator __first, _BidirectionalIterator __last, const basic_regex<_CharT, _Traits>& __e, const _CharT* __fmt, regex_constants::match_flag_type __flags = regex_constants::match_default) @@ -6505,7 +6505,7 @@ if (__i == __eof) { if (!(__flags & regex_constants::format_no_copy)) - __output = _VSTD::copy(__first, __last, __output); + __output_iter = _VSTD::copy(__first, __last, __output_iter); } else { @@ -6513,29 +6513,29 @@ for (size_t __len = char_traits<_CharT>::length(__fmt); __i != __eof; ++__i) { if (!(__flags & regex_constants::format_no_copy)) - __output = _VSTD::copy(__i->prefix().first, __i->prefix().second, __output); - __output = __i->format(__output, __fmt, __fmt + __len, __flags); + __output_iter = _VSTD::copy(__i->prefix().first, __i->prefix().second, __output_iter); + __output_iter = __i->format(__output_iter, __fmt, __fmt + __len, __flags); __lm = __i->suffix(); if (__flags & regex_constants::format_first_only) break; } if (!(__flags & regex_constants::format_no_copy)) - __output = _VSTD::copy(__lm.first, __lm.second, __output); + __output_iter = _VSTD::copy(__lm.first, __lm.second, __output_iter); } - return __output; + return __output_iter; } template inline _LIBCPP_INLINE_VISIBILITY _OutputIterator -regex_replace(_OutputIterator __output, +regex_replace(_OutputIterator __output_iter, _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(__output, __first, __last, __e, __fmt.c_str(), __flags); + return _VSTD::regex_replace(__output_iter, __first, __last, __e, __fmt.c_str(), __flags); } template