diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-09-02 21:17:18 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-01-07 17:46:17 +0000 | 
| commit | fe013be447cd855ccaf6094a1d06aea570450629 (patch) | |
| tree | 9adc1e0a5d25b6280995832bb29d592fb80554a6 /contrib/llvm-project/libcxx/include/__numeric/accumulate.h | |
| parent | 2f3b605b2e159522ecab77fd518e8139aaf581e9 (diff) | |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__numeric/accumulate.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__numeric/accumulate.h | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/llvm-project/libcxx/include/__numeric/accumulate.h b/contrib/llvm-project/libcxx/include/__numeric/accumulate.h index 81fc0c2943d9..d75c16ead2f2 100644 --- a/contrib/llvm-project/libcxx/include/__numeric/accumulate.h +++ b/contrib/llvm-project/libcxx/include/__numeric/accumulate.h @@ -17,6 +17,9 @@  #  pragma GCC system_header  #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> +  _LIBCPP_BEGIN_NAMESPACE_STD  template <class _InputIterator, class _Tp> @@ -25,7 +28,7 @@ _Tp  accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)  {      for (; __first != __last; ++__first) -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20          __init = _VSTD::move(__init) + *__first;  #else          __init = __init + *__first; @@ -39,7 +42,7 @@ _Tp  accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op)  {      for (; __first != __last; ++__first) -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER >= 20          __init = __binary_op(_VSTD::move(__init), *__first);  #else          __init = __binary_op(__init, *__first); @@ -49,4 +52,6 @@ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOpe  _LIBCPP_END_NAMESPACE_STD +_LIBCPP_POP_MACROS +  #endif // _LIBCPP___NUMERIC_ACCUMULATE_H  | 
