From e710425beb3de4adcf4d601da2f224503f876b6d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 25 Dec 2023 18:35:41 +0100 Subject: Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a. PR: 276104 MFC after: 1 month (cherry picked from commit cb14a3fe5122c879eae1fb480ed7ce82a699ddb6) --- contrib/llvm-project/libcxx/include/__algorithm/replace.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'contrib/llvm-project/libcxx/include/__algorithm/replace.h') 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 -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 -- cgit v1.2.3