aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h b/contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h
index 107e92968944..9a2258d9f58e 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h
@@ -18,17 +18,18 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-_OutputIterator
-replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
- const _Tp& __old_value, const _Tp& __new_value)
-{
- for (; __first != __last; ++__first, (void) ++__result)
- if (*__first == __old_value)
- *__result = __new_value;
- else
- *__result = *__first;
- return __result;
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator replace_copy(
+ _InputIterator __first,
+ _InputIterator __last,
+ _OutputIterator __result,
+ const _Tp& __old_value,
+ const _Tp& __new_value) {
+ for (; __first != __last; ++__first, (void)++__result)
+ if (*__first == __old_value)
+ *__result = __new_value;
+ else
+ *__result = *__first;
+ return __result;
}
_LIBCPP_END_NAMESPACE_STD