aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/replace.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-12-25 17:35:41 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-04-19 21:12:22 +0000
commite710425beb3de4adcf4d601da2f224503f876b6d (patch)
treeaca526ac7dde15560ae28f549319b25647f28363 /contrib/llvm-project/libcxx/include/__algorithm/replace.h
parent1bc094c4a0e74dba87a5eb98cf138426a19f702d (diff)
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/replace.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/replace.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/replace.h b/contrib/llvm-project/libcxx/include/__algorithm/replace.h
index 09b1dac79b70..8057c78686e1 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/replace.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/replace.h
@@ -18,13 +18,11 @@
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
-void
-replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value)
-{
- for (; __first != __last; ++__first)
- if (*__first == __old_value)
- *__first = __new_value;
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
+replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value) {
+ for (; __first != __last; ++__first)
+ if (*__first == __old_value)
+ *__first = __new_value;
}
_LIBCPP_END_NAMESPACE_STD