[libcxx-commits] [PATCH] D90569: [RFC] [libc++] P1645 constexpr for <numeric>

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 3 11:55:46 PST 2020


Mordante added a comment.

I had another look at the header and noticed something odd for all overloads of `inclusive_scan` and `transform_inclusive_scan` and their signatures are odd

  template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
  _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last,
                                 _OutputIterator __result, _BinaryOp __b,  _Tp __init)

Instead of the expected

  template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
  inline _LIBCPP_INLINE_VISIBILITY
  _OutputIterator
  inclusive_scan(_InputIterator __first, _InputIterator __last,
                 _OutputIterator __result, _BinaryOp __b,  _Tp __init)

Is there a reason why their signatures differ or is it an oversight?
Shall I fix them in this patch?



================
Comment at: libcxx/test/std/numerics/numeric.ops/accumulate/accumulate.pass.cpp:10
 // <numeric>
 
 // template <InputIterator Iter, MoveConstructible T>
----------------
I reverted the original change and redid the changes. I just noticed I forgot to re-add the `// Became constexpr in C++20` comment here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90569/new/

https://reviews.llvm.org/D90569



More information about the libcxx-commits mailing list