[libcxx-commits] [PATCH] D59813: The other fix for equal algo
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 26 06:34:05 PDT 2019
ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.
================
Comment at: include/pstl/internal/algorithm_impl.h:409
+bool
+equal_serial_impl(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
+ _ForwardIterator2 __last2, _BinaryPredicate __p)
----------------
This can also be called as `std::equal(first1, last1, first2, last2, pred)`. Is there any reason why we don't assume the presence of the usual `std::equal`?
================
Comment at: include/pstl/internal/algorithm_impl.h:426
+ [&]() {
+ if(std::distance(__first1, __last1) != std::distance(__first2, __last2))
+ return false;
----------------
This is all something that the serial `std::equal` does, and I'm uncomfortable with duplicating this logic here.
================
Comment at: include/pstl/internal/algorithm_impl.h:466
+{
+ if(__last1 - __first1 != __last2 - __first2)
+ return false;
----------------
Can you please put your changes through clang-format?
Repository:
rPSTL pstl
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59813/new/
https://reviews.llvm.org/D59813
More information about the libcxx-commits
mailing list