From 2f6ac6f232967a94ea013b853a296cc38be07e6c Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Tue, 4 Aug 2020 16:09:53 -0400 Subject: [PATCH] Add iterator_*_t helpers for iterator traits. - iterator_value_t - iterator_pointer_t - iterator_reference_t - iterator_difference_t - iterator_system_t --- thrust/iterator/detail/iterator_traits.inl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/thrust/iterator/detail/iterator_traits.inl b/thrust/iterator/detail/iterator_traits.inl index 8a9cc4ffb0..2d3cd5773e 100644 --- a/thrust/iterator/detail/iterator_traits.inl +++ b/thrust/iterator/detail/iterator_traits.inl @@ -33,6 +33,8 @@ template typedef typename thrust::iterator_traits::value_type type; }; // end iterator_value +template +using iterator_value_t = typename iterator_value::type; template struct iterator_pointer @@ -40,6 +42,8 @@ template typedef typename thrust::iterator_traits::pointer type; }; // end iterator_pointer +template +using iterator_pointer_t = typename iterator_pointer::type; template struct iterator_reference @@ -47,6 +51,8 @@ template typedef typename iterator_traits::reference type; }; // end iterator_reference +template +using iterator_reference_t = typename iterator_reference::type; template struct iterator_difference @@ -54,6 +60,9 @@ template typedef typename thrust::iterator_traits::difference_type type; }; // end iterator_difference +template +using iterator_difference_t = typename iterator_difference::type; + namespace detail { @@ -90,6 +99,8 @@ template<> typedef thrust::iterator_system::type type; }; // end iterator_system +template +using iterator_system_t = typename iterator_system::type; template struct iterator_traversal