[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 10:39:55 PST 2020
Mordante marked 2 inline comments as done.
Mordante added a comment.
In D90569#2371040 <https://reviews.llvm.org/D90569#2371040>, @ldionne wrote:
>> Or do you prefer small patches per function? (In that case I'll to update the status since it now expects one patch.)
>
> One patch for all is fine. But it's a good idea to iterate on this one function for now until we are good to go, and then you can do the other ones. This will avoid back and forth.
Thanks for the feedback. Then I'll make one patch for the paper once the first function is approved.
================
Comment at: libcxx/test/std/numerics/numeric.ops/accumulate/accumulate.pass.cpp:76
{
- test<input_iterator<const int*> >();
- test<forward_iterator<const int*> >();
- test<bidirectional_iterator<const int*> >();
- test<random_access_iterator<const int*> >();
- test<const int*>();
+#if _LIBCPP_STD_VER > 17
+ constexpr_test<input_iterator<const int*> >();
----------------
ldionne wrote:
> The tests for runtime and constexpr should be the same. Can you please take a look at `libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_n.pass.cpp` to see how we do it elsewhere?
That's a nice approach and indeed looks better than my approach.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90569/new/
https://reviews.llvm.org/D90569
More information about the libcxx-commits
mailing list