[libcxx-commits] [PATCH] D59705: Hot fix for equal algo

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 25 05:39:19 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL356891: [pstl] Call the right overload of std::equal with an execution policy (authored by ldionne, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D59705?vs=191905&id=192088#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D59705

Files:
  pstl/trunk/include/pstl/internal/glue_algorithm_impl.h


Index: pstl/trunk/include/pstl/internal/glue_algorithm_impl.h
===================================================================
--- pstl/trunk/include/pstl/internal/glue_algorithm_impl.h
+++ pstl/trunk/include/pstl/internal/glue_algorithm_impl.h
@@ -736,11 +736,10 @@
 equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
       _ForwardIterator2 __last2, _BinaryPredicate __p)
 {
-    //TODO: to get rid of "distance"
     if (std::distance(__first1, __last1) == std::distance(__first2, __last2))
         return std::equal(__first1, __last1, __first2, __p);
-    else
-        return false;
+
+    return false;
 }
 
 template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
@@ -748,7 +747,7 @@
 equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
       _ForwardIterator2 __last2)
 {
-    return equal(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __first2, __pstl::internal::pstl_equal());
+    return equal(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __first2, __last2, __pstl::internal::pstl_equal());
 }
 
 // [alg.move]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59705.192088.patch
Type: text/x-patch
Size: 1212 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190325/34c64bc6/attachment-0001.bin>


More information about the libcxx-commits mailing list