Skip to content

Commit

Permalink
Adding note about potential issue with ranges::iter_swap customizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
timmiesmith committed Sep 20, 2024
1 parent b73422d commit 4181be8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ Usage Example for Parallel Range Algorithms
oneapi::dpl::ranges::copy(oneapi::dpl::execution::dpcpp_default, view_in, std::span(vec_out));
}
Potential Issues
----------------
The ``sort`` and ``stable_sort`` algorithms provided use ``std::swap`` internally instead of ``std::ranges::iter_swap``
for swapping elements. Note that the ``std::ranges::sort`` algorithm in several C++ standard library
implementations also does not make use of ``std::ranges::iter_swap``. The potential issue is that customizations
targeting ``std::ranges::iter_swap`` will not be respected.

.. rubric:: See also:

:doc:`range_based_api`

0 comments on commit 4181be8

Please sign in to comment.