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) --- .../libcxx/include/__algorithm/replace_copy.h | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'contrib/llvm-project/libcxx/include/__algorithm/replace_copy.h') 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 -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 -- cgit v1.2.3