Skip to content

Commit

Permalink
Fix all_of documentation for empty ranges (#3358)
Browse files Browse the repository at this point in the history
all_of always returns true on an empty range.
  • Loading branch information
upsj authored Jan 13, 2025
1 parent b5b6e03 commit c998730
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thrust/thrust/logical.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ THRUST_NAMESPACE_BEGIN
* thrust::all_of(thrust::host, A, A + 3, thrust::identity<bool>()); // returns false
*
* // empty range
* thrust::all_of(thrust::host, A, A, thrust::identity<bool>()); // returns false
* thrust::all_of(thrust::host, A, A, thrust::identity<bool>()); // returns true
*
* \endcode
*
Expand Down Expand Up @@ -108,7 +108,7 @@ all_of(const thrust::detail::execution_policy_base<DerivedPolicy>& exec,
* thrust::all_of(A, A + 3, thrust::identity<bool>()); // returns false
*
* // empty range
* thrust::all_of(A, A, thrust::identity<bool>()); // returns false
* thrust::all_of(A, A, thrust::identity<bool>()); // returns true
*
* \endcode
*
Expand Down

0 comments on commit c998730

Please sign in to comment.