You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
requires the ``Body::operator()`` call with an object of type ``const value_type&`` or ``value_type&&`` to be well-formed if following requirements are met:
* the iterator meets the `Input iterator` requirements described in the [input.iterators] section of the ISO C++ Standard
49
-
* the iterator does not meet the `Forward iterator` requirements described in the [forward.iterators] section of the ISO C++ Standard
36
+
where
50
37
51
-
.. caution::
38
+
* ``ItemType`` is ``std::iterator_traits<Iterator>::value_type`` for the type of the iterator
39
+
the ``parallel_for_each`` algorithm operates with, and
40
+
* ``ReferenceType`` is ``std::iterator_traits<Iterator>::reference`` if the iterator type is
41
+
a `forward iterator` as described in the [forward.iterators] section of the ISO C++ Standard,
42
+
* otherwise, ``ReferenceType`` is ``ItemType&&``.
52
43
53
-
If the ``Body`` only takes non-const lvalue reference to the ``value_type``, the requirements described above
54
-
are violated, and the program can be ill-formed.
44
+
.. note::
55
45
56
-
Additional elements submitted into ``oneapi::tbb::parallel_for_each`` through the ``feeder::add`` are passed to the ``Body`` as rvalues. In this case, the corresponding
57
-
execution of the ``Body`` is required to be well-formed.
46
+
The usual rules for :ref:`pseudo-signatures <pseudo_signatures>` apply.
47
+
Therefore, ``Body::operator()`` may optionally take items by value or by ``const`` reference.
0 commit comments