From e4782430103201ae844fdaf1a41f33f53343cab3 Mon Sep 17 00:00:00 2001 From: mfrancis95 Date: Sun, 24 May 2020 00:13:14 -0400 Subject: [PATCH] Use placeholder expression in thrust::count --- thrust/system/detail/generic/count.inl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/thrust/system/detail/generic/count.inl b/thrust/system/detail/generic/count.inl index d9e1039e8..f12f0122e 100644 --- a/thrust/system/detail/generic/count.inl +++ b/thrust/system/detail/generic/count.inl @@ -54,8 +54,9 @@ __host__ __device__ typename thrust::iterator_traits::difference_type count(thrust::execution_policy &exec, InputIterator first, InputIterator last, const EqualityComparable& value) { - // XXX use placeholder expression here - return thrust::count_if(exec, first, last, thrust::detail::equal_to_value(value)); + using thrust::placeholders::_1; + + return thrust::count_if(exec, first, last, _1 == value); } // end count()