diff --git a/thrust/iterator/detail/tagged_iterator.h b/thrust/iterator/detail/tagged_iterator.h index 4ac030644..24cbbb736 100644 --- a/thrust/iterator/detail/tagged_iterator.h +++ b/thrust/iterator/detail/tagged_iterator.h @@ -58,6 +58,21 @@ template : super_t(x) {} }; // end tagged_iterator +/*! \p make_tagged_iterator creates a \p tagged_iterator + * from a \c Iterator with system tag \c Tag. + * + * \tparam Tag Any system tag. + * \tparam Iterator Any iterator type. + * \param iter The iterator of interest. + * \return An iterator whose system tag is \p Tag and whose behavior is otherwise + * equivalent to \p iter. + */ +template +inline auto make_tagged_iterator(Iterator iter) -> tagged_iterator +{ + return tagged_iterator(iter); +} + } // end detail // tagged_iterator is trivial if its base iterator is.