thrust/thrust — pull request #467 by gnzlbg (2014-01-31 10:41:07+00:00)
Title: Add range-based for_each and transform

Range-based interface for:
- thrust::for_each,
- thrust::transform, and
- thrust::transform_reduce.

Initial proposal of range-based interfaces
which mimicks Boost.Range 2.0, see issue #127.

Each range algorithm takes a range by either lvalue
reference or const lvalue reference. This allows to
iterate over lvalues, const lvalues, and rvalues.

This introduces some code duplication. Support for
rvalue references (issue #129) would fix this since the reference
colapsing rules for SinglePassRange&& would deduce the
correct reference type. Rvalue reference would also allow
further optimizations (e.g. perfect forwarding).