#include <thrust/iterator/iterator_traits.h>
iterator_traits is a type trait class that provides a uniform interface for querying the properties of iterators at compile-time.
iterator_traits