35 #include <thrust/detail/config.h> 38 #include <thrust/iterator/detail/transform_iterator.inl> 41 #include <thrust/detail/type_traits.h> 43 THRUST_NAMESPACE_BEGIN
188 template <
class AdaptableUnaryFunction,
class Iterator,
class Reference = use_default,
class Value = use_default>
190 :
public detail::transform_iterator_base<AdaptableUnaryFunction, Iterator, Reference, Value>::type
196 detail::transform_iterator_base<AdaptableUnaryFunction, Iterator, Reference, Value>::type
209 #if THRUST_CPP_DIALECT >= 2011 221 : super_t(x), m_f(f) {
238 template<
typename OtherAdaptableUnaryFunction,
239 typename OtherIterator,
240 typename OtherReference,
244 typename thrust::detail::enable_if_convertible<OtherIterator, Iterator>::type* = 0,
245 typename thrust::detail::enable_if_convertible<OtherAdaptableUnaryFunction, AdaptableUnaryFunction>::type* = 0)
246 : super_t(other.base()), m_f(other.functor()) {}
261 return do_assign(other,
263 #
if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) && (THRUST_GCC_VERSION <= 40201)
264 thrust::detail::true_type()
266 typename thrust::detail::is_copy_assignable<AdaptableUnaryFunction>::type()
284 super_t::operator=(other);
295 super_t::operator=(other);
305 THRUST_DISABLE_MSVC_WARNING_BEGIN(4172)
307 __thrust_exec_check_disable__
314 typename thrust::iterator_value<Iterator>::type
const& x = *this->base();
318 THRUST_DISABLE_MSVC_WARNING_END(4172)
322 mutable AdaptableUnaryFunction m_f;
340 template <
class AdaptableUnaryFunction,
class Iterator>
341 inline __host__ __device__
thrust::reference< T, thrust::system::cpp::tag > reference
Definition: pointer.h:98
Definition: iterator_facade.h:60
__host__ __device__ transform_iterator< AdaptableUnaryFunction, Iterator > make_transform_iterator(Iterator it, AdaptableUnaryFunction fun)
Definition: transform_iterator.h:343
Traits and metafunctions for reasoning about the traits of iterators.
A class which exposes a public interface for iterators.