@@ -24,6 +24,18 @@ Iterators
2424The oneDPL iterators are defined in the ``<oneapi/dpl/iterator> `` header,
2525in ``namespace oneapi::dpl ``.
2626
27+ Let us define a named requirement, ``AdaptingIteratorSource ``, to describe valid random access iterator-like
28+ types that can be used as source for oneDPL iterators as described below.
29+ The type ``Iter `` satisfies the ``AdaptingIteratorSource `` named requirement if it is any of the following:
30+
31+ * A random access iterator
32+ * The unspecified iterator-like type returned by ``oneapi::dpl::begin `` or ``oneapi::dpl::end ``
33+ * A ``permutation_iterator ``
34+ * A ``transform_iterator ``
35+ * A ``counting_iterator ``
36+ * A ``discard_iterator ``
37+ * A ``zip_iterator ``
38+
2739.. code :: cpp
2840
2941 template <typename Integral>
@@ -153,7 +165,19 @@ defined by the source iterator provided, and whose iteration order over the dere
153165is defined by either another iterator or a functor that maps the ``permutation_iterator `` index
154166to the index of the source iterator. The arithmetic and comparison operators of
155167``permutation_iterator `` behave as if applied to integer counter values maintained by the
156- iterator instances to determine their position in the index map.
168+ iterator instances to determine their position in the index map. ``SourceIterator `` must satisfy
169+ ``AdaptingIteratorSource ``.
170+
171+ The type ``IndexMap `` must be one of the following:
172+
173+ * A random access iterator
174+ * The unspecified iterator-like type returned by ``oneapi::dpl::begin `` or ``oneapi::dpl::end ``
175+ * A ``permutation_iterator ``
176+ * A ``transform_iterator ``
177+ * A ``counting_iterator ``
178+ * A functor with a signature equivalent to ``T operator()(const T&) const `` where ``T `` is a
179+ ``std::iterator_traits<SourceIterator>::difference_type ``
180+
157181
158182``permutation_iterator::operator* `` uses the counter value of the instance on which
159183it is invoked to index into the index map. The corresponding value in the map is then used
@@ -222,7 +246,8 @@ defined by the unary function and source iterator provided. When dereferenced,
222246element of the source iterator; dereference operations cannot be used to modify the elements of
223247the source iterator unless the unary function result includes a reference to the element. The
224248arithmetic and comparison operators of ``transform_iterator `` behave as if applied to the
225- source iterator itself.
249+ source iterator itself. The template type ``Iterator `` must satisfy
250+ ``AdaptingIteratorSource ``.
226251
227252.. code :: cpp
228253
@@ -280,7 +305,8 @@ using the source iterator and unary function object provided.
280305the value returned from ``zip_iterator `` is a tuple of the values returned by dereferencing the
281306source iterators over which the ``zip_iterator `` is defined. The arithmetic operators of
282307``zip_iterator `` update the source iterators of a ``zip_iterator `` instance as though the
283- operation were applied to each of these iterators.
308+ operation were applied to each of these iterators. The types ``T `` within the template pack
309+ ``Iterators... `` must satisfy ``AdaptingIteratorSource ``.
284310
285311.. code :: cpp
286312
0 commit comments