From 988b1baa5f2d84e2c545ea6d61d85dddc95070f9 Mon Sep 17 00:00:00 2001 From: mfrancis95 Date: Wed, 27 May 2020 00:35:53 -0400 Subject: [PATCH] Use placeholder expression in thrust::find --- thrust/system/detail/generic/find.inl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/thrust/system/detail/generic/find.inl b/thrust/system/detail/generic/find.inl index 9414fc615..a7126825d 100644 --- a/thrust/system/detail/generic/find.inl +++ b/thrust/system/detail/generic/find.inl @@ -45,8 +45,9 @@ InputIterator find(thrust::execution_policy &exec, InputIterator last, const T& value) { - // XXX consider a placeholder expression here - return thrust::find_if(exec, first, last, thrust::detail::equal_to_value(value)); + using thrust::placeholders::_1; + + return thrust::find_if(exec, first, last, _1 == value); } // end find()