diff --git a/thrust/execution_policy.h b/thrust/execution_policy.h index 1e5dfa8f7..ecf14413f 100644 --- a/thrust/execution_policy.h +++ b/thrust/execution_policy.h @@ -282,10 +282,9 @@ template * } * }; * ... - * int vec(3); - * vec[0] = 0; vec[1] = 1; vec[2] = 2; + * int vec[] = { 0, 1, 2 }; * - * thrust::for_each(thrust::host, vec.begin(), vec.end(), printf_functor()); + * thrust::for_each(thrust::host, vec, vec + 3, printf_functor()); * * // 0 1 2 is printed to standard output in some unspecified order * \endcode