thrust

◆ raw_reference_cast() [2/2]

template<typename T >
__host__ __device__ detail::raw_reference<const T>::type thrust::raw_reference_cast ( const T &  ref)

raw_reference_cast creates a "raw" reference from a wrapped reference type, simply returning the underlying reference, should it exist.

If the argument is not a reference wrapper, the result is a reference to the argument.

Parameters
refThe reference of interest.
Returns
*thrust::raw_pointer_cast(&ref).
Note
There are two versions of raw_reference_cast. One for const references, and one for non-const.
See also
raw_pointer_cast