From: Louis Dionne Date: Mon, 25 Mar 2019 12:37:51 +0000 (+0000) Subject: [pstl] Call the right overload of std::equal with an execution policy X-Git-Tag: llvmorg-10-init~9263 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86d4ec756b5e0bc72d7e78fc574e05802959ead4;p=platform%2Fupstream%2Fllvm.git [pstl] Call the right overload of std::equal with an execution policy Thanks to Mikhail Dvorskiy for the patch. Differential Revision: https://reviews.llvm.org/D59705 llvm-svn: 356891 --- diff --git a/pstl/include/pstl/internal/glue_algorithm_impl.h b/pstl/include/pstl/internal/glue_algorithm_impl.h index 105188d..9236dbf 100644 --- a/pstl/include/pstl/internal/glue_algorithm_impl.h +++ b/pstl/include/pstl/internal/glue_algorithm_impl.h @@ -736,11 +736,10 @@ __pstl::internal::enable_if_execution_policy<_ExecutionPolicy, bool> 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 @@ -748,7 +747,7 @@ __pstl::internal::enable_if_execution_policy<_ExecutionPolicy, bool> 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]