diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-25 17:35:41 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:12:22 +0000 |
| commit | e710425beb3de4adcf4d601da2f224503f876b6d (patch) | |
| tree | aca526ac7dde15560ae28f549319b25647f28363 /contrib/llvm-project/libcxx/include/__algorithm/remove_copy.h | |
| parent | 1bc094c4a0e74dba87a5eb98cf138426a19f702d (diff) | |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/remove_copy.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/remove_copy.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/remove_copy.h b/contrib/llvm-project/libcxx/include/__algorithm/remove_copy.h index 060833813d21..7be4c166ce3d 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/remove_copy.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/remove_copy.h @@ -18,19 +18,15 @@ _LIBCPP_BEGIN_NAMESPACE_STD template <class _InputIterator, class _OutputIterator, class _Tp> -inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 -_OutputIterator -remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) -{ - for (; __first != __last; ++__first) - { - if (!(*__first == __value)) - { - *__result = *__first; - ++__result; - } +inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator +remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) { + for (; __first != __last; ++__first) { + if (!(*__first == __value)) { + *__result = *__first; + ++__result; } - return __result; + } + return __result; } _LIBCPP_END_NAMESPACE_STD |
